ci: enable gocognit (#9359)

And, bring the server under 300:

* Removed the undocumented "disable" STUN address in favor of the
--disable-direct flag.
This commit is contained in:
Ammar Bandukwala
2023-08-27 14:46:44 -05:00
committed by GitHub
parent 173aac959c
commit 6ba92ef924
14 changed files with 263 additions and 272 deletions
+7
View File
@@ -831,6 +831,13 @@ func (r *RootCmd) checkWarnings(i *clibase.Invocation, client *codersdk.Client)
return nil
}
// Verbosef logs a message if verbose mode is enabled.
func (r *RootCmd) Verbosef(inv *clibase.Invocation, fmtStr string, args ...interface{}) {
if r.verbose {
cliui.Infof(inv.Stdout, fmtStr, args...)
}
}
type headerTransport struct {
transport http.RoundTripper
header http.Header