Skip to content

Commit

Permalink
Attempt to get around the linter?
Browse files Browse the repository at this point in the history
  • Loading branch information
Garbett1 committed Jan 6, 2024
1 parent a097c99 commit 541c212
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type LoggingOpts struct {

// AdminOpts is a re-export of the admin type so servers don't need to import it directly.
type AdminOpts struct {
admin.Opts
Admin admin.Opts
EnableGcpProfiling bool `long:"gcp_profiling" description:"Enable pushing profiles to GCP Cloud profiling." env:"ADMIN_GCP_PROFILING"`
}

Expand All @@ -49,12 +49,12 @@ func ParseFlagsOrDie(name string, opts interface{}, loggingOpts *LoggingOpts) (s
// ServeAdmin starts the admin HTTP server.
// It will block forever so the caller may well want to use a goroutine.
func ServeAdmin(serviceName string, opts AdminOpts, info logging.LogLevelInfo) {
opts.Logger = logging.MustGetLoggerNamed("github.com.thought-machine.http-admin")
opts.LogInfo = info
opts.Admin.Logger = logging.MustGetLoggerNamed("github.com.thought-machine.http-admin")
opts.Admin.LogInfo = info
if opts.EnableGcpProfiling {
setupProfiling(serviceName)
}
go admin.Serve(opts.Opts)
go admin.Serve(opts.Admin)
}

func setupProfiling(serviceName string) {
Expand Down

0 comments on commit 541c212

Please sign in to comment.