MCPcopy
hub / github.com/grafana/tempo / New

Function New

tools/chloggen/internal/config/config.go:61–68  ·  view source on GitHub ↗

New returns a new Config with default values.

(rootDir string)

Source from the content-addressed store, hash-verified

59
60// New returns a new Config with default values.
61func New(rootDir string) *Config {
62 return &Config{
63 ChangeLogs: map[string]string{DefaultChangeLogKey: filepath.Join(rootDir, DefaultChangeLogFilename)},
64 DefaultChangeLogs: []string{DefaultChangeLogKey},
65 EntriesDir: filepath.Join(rootDir, DefaultEntriesDir),
66 TemplateYAML: filepath.Join(rootDir, DefaultEntriesDir, DefaultTemplateYAML),
67 }
68}
69
70// NewFromFile returns a new Config from the specified YAML file.
71func NewFromFile(rootDir string, cfgFilename string) (*Config, error) {

Callers 12

setupTestDirFunction · 0.92
TestNewFunction · 0.92
TestUpdateErrFunction · 0.92
TestUpdateFunction · 0.92
initConfigFunction · 0.92
TestValidateFunction · 0.92
TestNewFunction · 0.70
TestNewFromFileFunction · 0.70

Calls 1

JoinMethod · 0.65

Tested by 11

setupTestDirFunction · 0.74
TestNewFunction · 0.74
TestUpdateErrFunction · 0.74
TestUpdateFunction · 0.74
TestValidateFunction · 0.74
TestNewFunction · 0.56
TestNewFromFileFunction · 0.56