Skip to content

Commit

Permalink
Fixed Global Method -m for multiple methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
glitchedgitz committed Dec 23, 2023
1 parent b5aec04 commit 73ff7ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion v2/cmd/cook/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func applyMethods(vallll []string, meths []string, array *[]string) {
tmp = append(tmp, string(output))
}
} else {
fmt.Fprintf(os.Stderr, "\nFunc \"%s\" Doesn't exists\n", f)
fmt.Fprintf(os.Stderr, "\nMethod \"%s\" Doesn't exists\n", f)
mistypedCheck(f)
os.Exit(0)
}
Expand Down
6 changes: 5 additions & 1 deletion v2/cmd/cook/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@ package main

import (
"fmt"
"strings"
)

func print() {

if len(methodsForAll) > 0 {
tmp := []string{}
applyMethods(final, splitMethods(methodsForAll), &tmp)

for _, meth := range strings.Split(methodsForAll, ",") {
applyMethods(final, splitMethods(meth), &tmp)
}
for _, v := range tmp {
fmt.Println(v)
}
Expand Down

0 comments on commit 73ff7ac

Please sign in to comment.