feat: add app name verification to all golang plugins

Moving verification of input to the earliest place is the best way to decrease the need to validate this further downstream.

Additionally, some of the existing checks were.... lacking :)
This commit is contained in:
Jose Diaz-Gonzalez
2020-12-25 00:00:26 -05:00
parent 382dc01b33
commit ffa303092f
8 changed files with 41 additions and 94 deletions

View File

@@ -1,7 +1,6 @@
package logs
import (
"errors"
"fmt"
"strconv"
@@ -10,10 +9,6 @@ import (
// CommandDefault displays recent log output
func CommandDefault(appName string, num int64, process string, tail, quiet bool) error {
if appName == "" {
return errors.New("Please specify an app to run the command on")
}
if err := common.VerifyAppName(appName); err != nil {
return err
}