MCPcopy Index your code
hub / github.com/getsops/sops / loadConfigFile

Function loadConfigFile

config/config.go:453–465  ·  view source on GitHub ↗
(confPath string)

Source from the content-addressed store, hash-verified

451}
452
453func loadConfigFile(confPath string) (*configFile, error) {
454 confBytes, err := os.ReadFile(confPath)
455 if err != nil {
456 return nil, fmt.Errorf("could not read config file: %s", err)
457 }
458 conf := &configFile{}
459 conf.Stores = *NewStoresConfig()
460 err = conf.load(confBytes)
461 if err != nil {
462 return nil, fmt.Errorf("error loading config: %s", err)
463 }
464 return conf, nil
465}
466
467func configFromRule(rule *creationRule, kmsEncryptionContext map[string]*string) (*Config, error) {
468 cryptRuleCount := 0

Callers 3

LoadCreationRuleForFileFunction · 0.85
LoadStoresConfigFunction · 0.85

Calls 2

loadMethod · 0.95
NewStoresConfigFunction · 0.85

Tested by

no test coverage detected