feat: add configuration checking

This commit is contained in:
Jonas Kaninda
2024-11-10 14:52:31 +01:00
parent 1a038ce0f5
commit a549e33e9a
9 changed files with 202 additions and 36 deletions

View File

@@ -17,8 +17,8 @@ limitations under the License.
package config
import (
"github.com/jkaninda/goma-gateway/pkg/logger"
"github.com/spf13/cobra"
"log"
)
var Cmd = &cobra.Command{
@@ -28,7 +28,7 @@ var Cmd = &cobra.Command{
if len(args) == 0 {
return
} else {
logger.Fatal(`"config" accepts no argument %q`, args)
log.Fatalf("Config accepts no argument %q", args)
}
@@ -37,4 +37,5 @@ var Cmd = &cobra.Command{
func init() {
Cmd.AddCommand(InitConfigCmd)
Cmd.AddCommand(CheckConfigCmd)
}