Skip to content

Commit

Permalink
fixed cows function
Browse files Browse the repository at this point in the history
  • Loading branch information
Code-Hex committed Nov 3, 2021
1 parent 850360c commit b719d09
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cowsay.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ func Say(options ...Option) (string, error) {

// Cows to get list of cows
func Cows() []string {
cows := make([]string, 0, len(AssetNames()))
for _, key := range AssetNames() {
assets := AssetNames()
cows := make([]string, 0, len(assets))
for _, key := range assets {
cows = append(cows, strings.TrimSuffix(strings.TrimPrefix(key, "cows/"), ".cow"))
}

Expand Down

0 comments on commit b719d09

Please sign in to comment.