mirror of
https://github.com/teivah/100-go-mistakes.git
synced 2026-06-25 02:46:53 +08:00
Merge 29b4d0299d into c13d0b4807
This commit is contained in:
commit
c931c24f84
3 changed files with 4 additions and 4 deletions
|
|
@ -236,7 +236,7 @@ func WithPort(port int) Option {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewServer(addr string, opts ...Option) ( *http.Server, error) {
|
func NewServer(addr string, opts ...Option) (*http.Server, error) {
|
||||||
var options options
|
var options options
|
||||||
for _, opt := range opts {
|
for _, opt := range opts {
|
||||||
err := opt(&options)
|
err := opt(&options)
|
||||||
|
|
|
||||||
|
|
@ -243,7 +243,7 @@ func WithPort(port int) Option {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewServer(addr string, opts ...Option) ( *http.Server, error) {
|
func NewServer(addr string, opts ...Option) (*http.Server, error) {
|
||||||
var options options
|
var options options
|
||||||
for _, opt := range opts {
|
for _, opt := range opts {
|
||||||
err := opt(&options)
|
err := opt(&options)
|
||||||
|
|
@ -2036,4 +2036,4 @@ ticker = time.NewTicker(1000 * time.Nanosecond)
|
||||||
|
|
||||||
???+ info "要約"
|
???+ info "要約"
|
||||||
|
|
||||||
Docker と Kubernetes にデプロイする際の CPU スロットリングを回避するには、Go言語が CFS 対応ではないことに留意してください。
|
Docker と Kubernetes にデプロイする際の CPU スロットリングを回避するには、Go言語が CFS 対応ではないことに留意してください。
|
||||||
|
|
|
||||||
|
|
@ -233,7 +233,7 @@ func WithPort(port int) Option {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewServer(addr string, opts ...Option) ( *http.Server, error) {
|
func NewServer(addr string, opts ...Option) (*http.Server, error) {
|
||||||
var options options
|
var options options
|
||||||
for _, opt := range opts {
|
for _, opt := range opts {
|
||||||
err := opt(&options)
|
err := opt(&options)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue