fix(citations): correct NewServeMux citation in package-design.md
server.go:2639 → 2638 (function declaration line)
Body drift: 'return new(ServeMux)' → 'return &ServeMux{}'
This commit is contained in:
@@ -379,12 +379,12 @@ srv := &http.Server{
|
||||
|
||||
## 7. Constructor Pattern — NewX Functions
|
||||
|
||||
### Source: [src/net/http/server.go#L2639](https://github.com/golang/go/blob/17bd5ab8c650155dd2bd09f7005726552639eea0/src/net/http/server.go#L2639), [src/database/sql/sql.go#L836](https://github.com/golang/go/blob/17bd5ab8c650155dd2bd09f7005726552639eea0/src/database/sql/sql.go#L836)
|
||||
### Source: [src/net/http/server.go#L2638](https://github.com/golang/go/blob/17bd5ab8c650155dd2bd09f7005726552639eea0/src/net/http/server.go#L2638), [src/database/sql/sql.go#L836](https://github.com/golang/go/blob/17bd5ab8c650155dd2bd09f7005726552639eea0/src/database/sql/sql.go#L836)
|
||||
|
||||
```go
|
||||
// src/net/http/server.go:2639
|
||||
// src/net/http/server.go:2638
|
||||
func NewServeMux() *ServeMux {
|
||||
return new(ServeMux)
|
||||
return &ServeMux{}
|
||||
}
|
||||
|
||||
// [src/database/sql/sql.go#L836](https://github.com/golang/go/blob/17bd5ab8c650155dd2bd09f7005726552639eea0/src/database/sql/sql.go#L836)
|
||||
|
||||
Reference in New Issue
Block a user