MCPcopy
hub / github.com/minio/minio-go / loadProfile

Function loadProfile

pkg/credentials/file_aws_credentials.go:157–167  ·  view source on GitHub ↗

loadProfiles loads from the file pointed to by shared credentials filename for profile. The credentials retrieved from the profile will be returned or error. Error will be returned if it fails to read from the file, or the data is invalid.

(filename, profile string)

Source from the content-addressed store, hash-verified

155// The credentials retrieved from the profile will be returned or error. Error will be
156// returned if it fails to read from the file, or the data is invalid.
157func loadProfile(filename, profile string) (*ini.Section, error) {
158 config, err := ini.Load(filename)
159 if err != nil {
160 return nil, err
161 }
162 iniProfile, err := config.GetSection(profile)
163 if err != nil {
164 return nil, err
165 }
166 return iniProfile, nil
167}

Callers 1

retrieveMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected