関数 var authrepo *auth.SQLiteRepository { var err error authrepo, err = auth.NewSQLiteRepository(*authURN) if err != nil { logger.Log("during", "auth.NewSQLiteRepository", "err", err) os.Exit(1) } } var authsvc *auth.Service { authsvc = auth.NewService(authrepo, authEventsTotal) } var api http.Handler { r := mux.NewRouter() r.PathPrefix("/auth/").Handler(http.StripPrefix("/auth", auth.NewHTTPTransport(authsvc))) api = ctxlog.NewHTTPMiddleware(r, logger) }