Skip to content

Commit

Permalink
chore: update some gh action script and method comments
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Jul 4, 2022
1 parent b810892 commit 4806a21
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ title: '## Change Log'
style: gh-release
# group names
names: [Refactor, Fixed, Feature, Update, Other]
repo_url: https://github.com/gookit/config
# if empty will auto fetch by git remote
#repo_url: https://github.com/gookit/config

filters:
# message length should >= 12
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Generate changelog
run: |
go install github.com/gookit/gitw/cmd/chlog@latest
chlog -config .github/changelog.yml -output testdata/changelog.md prev last
chlog -c .github/changelog.yml -o testdata/changelog.md prev last
# https://github.com/softprops/action-gh-release
- name: Create release and upload assets
Expand Down
1 change: 1 addition & 0 deletions load.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ var validTypes = map[string]int{
func LoadFlags(keys []string) error { return dc.LoadFlags(keys) }

// LoadFlags parse command line arguments, based on provide keys.
//
// Usage:
// // debug flag is bool type
// c.LoadFlags([]string{"env", "debug:bool"})
Expand Down
6 changes: 6 additions & 0 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,18 @@ func (c *Config) SetEncoders(encoders map[string]Encoder) {
* helper methods/functions
*************************************************************/

// LoadENVFiles load
// func LoadENVFiles(filePaths ...string) error {
// return dotenv.LoadFiles(filePaths...)
// }

// GetEnv get os ENV value by name
func GetEnv(name string, defVal ...string) (val string) {
return Getenv(name, defVal...)
}

// Getenv get os ENV value by name. like os.Getenv, but support default value
//
// Notice:
// - Key is not case-sensitive when getting
func Getenv(name string, defVal ...string) (val string) {
Expand Down

0 comments on commit 4806a21

Please sign in to comment.