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

Method SetDirectory

config/http_config.go:1357–1364  ·  view source on GitHub ↗

SetDirectory joins any relative file paths with dir.

(dir string)

Source from the content-addressed store, hash-verified

1355
1356// SetDirectory joins any relative file paths with dir.
1357func (c *TLSConfig) SetDirectory(dir string) {
1358 if c == nil {
1359 return
1360 }
1361 c.CAFile = JoinDir(dir, c.CAFile)
1362 c.CertFile = JoinDir(dir, c.CertFile)
1363 c.KeyFile = JoinDir(dir, c.KeyFile)
1364}
1365
1366// UnmarshalYAML implements the yaml.Unmarshaler interface.
1367func (c *TLSConfig) UnmarshalYAML(unmarshal func(any) error) error {

Callers

nothing calls this directly

Calls 1

JoinDirFunction · 0.85

Tested by

no test coverage detected