3 ms·
> A discrete, named entity (a struct) is a distinct concept from a way to increase readability of a function call (keyword arguments). If you take func Ne
by preseinger 5y ago
> A discrete, named entity (a struct) is a distinct concept from a way to increase readability of a function call (keyword arguments).
If you take
func NewServer(addr string, certKey, certCA []byte, ...) (*Server, error)
and coalesce the input parameters into
type ServerConfig struct {
Addr string
CertKey []byte
CertCA []byte
...
then that type is still a meaningful domain concept in your program. There is no minimum scope requirement for discrete, named entities, is there?