Skip to content

Commit

Permalink
add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
skotambkar committed Dec 21, 2020
1 parent 0303236 commit 4b432be
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
12 changes: 10 additions & 2 deletions config/load_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,19 @@ type LoadOptions struct {
SharedConfigProfile string

// SharedConfigFiles is the slice of custom shared config files to use when loading the SharedConfig.
// The profile name used within config file must prefix 'profile'.
// A non-default profile used within config file must have name defined with prefix 'profile '.
// eg [profile xyz] indicates a profile with name 'xyz'.
// If duplicate profiles are provided with a same, or across multiple shared config files, the next parsed
// profile will override only properties that conflict with the previously defined profile.
SharedConfigFiles []string

// SharedCredentialsFile is the slice of custom shared credentials files to use when loading the SharedConfig.
// The profile name used within credentials file must not prefix 'profile'.
// The profile name used within credentials file must not prefix 'profile '.
// eg [xyz] indicates a profile with name 'xyz'. Profile declared as [profile xyz] will be ignored.
// If duplicate profiles are provided with a same, or across multiple shared credentials files, the next parsed
// profile will override only properties that conflict with the previously defined profile.
// If duplicate profiles are provided within a shared credentials and shared config files, the properties
// defined in shared credentials file take precedence.
SharedCredentialsFiles []string

// CustomCABundle is CA bundle PEM bytes reader
Expand Down
1 change: 1 addition & 0 deletions internal/ini/testdata/valid/commented_profile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
[ default ]
region = "foo-region" # another comment
output = json # comment again
bar = 123 ; comment with semi-colon
3 changes: 2 additions & 1 deletion internal/ini/testdata/valid/commented_profile_expected
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"default": {
"region": "foo-region",
"output": "json"
"output": "json",
"bar": "123"
}
}

0 comments on commit 4b432be

Please sign in to comment.