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

Method SetDirectory

config/http_config.go:364–374  ·  view source on GitHub ↗

SetDirectory joins any relative file paths with dir.

(dir string)

Source from the content-addressed store, hash-verified

362
363// SetDirectory joins any relative file paths with dir.
364func (c *HTTPClientConfig) SetDirectory(dir string) {
365 if c == nil {
366 return
367 }
368 c.TLSConfig.SetDirectory(dir)
369 c.BasicAuth.SetDirectory(dir)
370 c.Authorization.SetDirectory(dir)
371 c.OAuth2.SetDirectory(dir)
372 c.HTTPHeaders.SetDirectory(dir)
373 c.BearerTokenFile = JoinDir(dir, c.BearerTokenFile)
374}
375
376// nonZeroCount returns the amount of values that are non-zero.
377func 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