mirror of
https://github.com/teivah/100-go-mistakes.git
synced 2026-06-26 03:16:58 +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
|
||||
for _, opt := range opts {
|
||||
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
|
||||
for _, opt := range opts {
|
||||
err := opt(&options)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
for _, opt := range opts {
|
||||
err := opt(&options)
|
||||
|
|
|
|||
Loading…
Reference in a new issue