MCPcopy Create free account
hub / github.com/prometheus/common / SetDirectory

Method SetDirectory

config/http_config.go:362–372  ·  view source on GitHub ↗

SetDirectory joins any relative file paths with dir.

(dir string)

Source from the content-addressed store, hash-verified

360
361// SetDirectory joins any relative file paths with dir.
362func (c *HTTPClientConfig) SetDirectory(dir string) {
363 if c == nil {
364 return
365 }
366 c.TLSConfig.SetDirectory(dir)
367 c.BasicAuth.SetDirectory(dir)
368 c.Authorization.SetDirectory(dir)
369 c.OAuth2.SetDirectory(dir)
370 c.HTTPHeaders.SetDirectory(dir)
371 c.BearerTokenFile = JoinDir(dir, c.BearerTokenFile)
372}
373
374// nonZeroCount returns the amount of values that are non-zero.
375func nonZeroCount[T comparable](values ...T) int {

Callers

nothing calls this directly

Calls 2

JoinDirFunction · 0.85
SetDirectoryMethod · 0.65

Tested by

no test coverage detected