MCPcopy Create free account
hub / github.com/checkmake/checkmake / NewConfigFromFile

Function NewConfigFromFile

config/config.go:19–26  ·  view source on GitHub ↗

NewConfigFromFile returns a config struct that is filled with the values from the passed in ini file

(path string)

Source from the content-addressed store, hash-verified

17// NewConfigFromFile returns a config struct that is filled with the values
18// from the passed in ini file
19func NewConfigFromFile(path string) (*Config, error) {
20 iniFile, err := ini.Load(path)
21 ret := &Config{
22 iniFile: iniFile,
23 }
24
25 return ret, err
26}
27
28// GetRuleConfig returns a rules.RuleConfig for the given rule. A rule
29// corresponds to a section in the config ini file

Callers 7

loadConfigFunction · 0.92
TestSimpleConfigFunction · 0.85
TestFailConfigFunction · 0.85
TestGetConfigValueFunction · 0.85

Calls

no outgoing calls

Tested by 6

TestSimpleConfigFunction · 0.68
TestFailConfigFunction · 0.68
TestGetConfigValueFunction · 0.68