Skip to content

Commit

Permalink
Fix golangci-lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bcspragu committed Dec 23, 2022
1 parent d86e671 commit b87124b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions frpembed.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,13 @@ func Run(ctx context.Context, serverAddr string, token string, opts ...ConfigOpt
})
// We assume there's no config for a custom logger. If there is, the caller can
// include it directly in their custom implementation.
frplog.Log.SetLogger("custom", "")
if err := frplog.Log.SetLogger("custom", ""); err != nil {
return fmt.Errorf("failed to set custom logger: %w", err)
}
case cfg.AdapterName != "":
frplog.Log.SetLogger(cfg.AdapterName, cfg.AdapterConfig...)
if err := frplog.Log.SetLogger(cfg.AdapterName, cfg.AdapterConfig...); err != nil {
return fmt.Errorf("failed to set %q logger: %w", cfg.AdapterName, err)
}
}

proxyConf := make(map[string]frpconfig.ProxyConf)
Expand Down

0 comments on commit b87124b

Please sign in to comment.