refactor: remove vars

This commit is contained in:
Kevin Franklin Kim 2021-11-16 15:31:00 +01:00
parent 73398f0c7e
commit b8955ef4f5

View File

@ -29,18 +29,11 @@ type Server struct {
}
func NewServer(opts ...Option) *Server {
var (
defaultShutdownTimeout = 5 * time.Second
defaultConfig = config.Config()
defaultLogger = log.Logger()
defaultCtx = context.Background()
)
inst := &Server{
shutdownTimeout: defaultShutdownTimeout,
ctx: defaultCtx,
c: defaultConfig,
l: defaultLogger,
shutdownTimeout: 5 * time.Second,
ctx: context.Background(),
c: config.Config(),
l: log.Logger(),
}
for _, opt := range opts {