Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumGofunctional options patternSingle-choice MCQ

In the functional options pattern, what is the conventional type signature of an option?

type Server struct { port int; tls bool } type Option func(*Server) func WithPort(p int) Option { return func(s *Server) { s.port = p } }