initial revision
This commit is contained in:
32
cmd/aws-mgmt/root.go
Normal file
32
cmd/aws-mgmt/root.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log/slog"
|
||||
"os"
|
||||
|
||||
cli "github.com/urfave/cli/v2"
|
||||
|
||||
"aws-mgmt/internal/cmd"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
log := slog.New(slog.NewTextHandler(os.Stderr, &slog.HandlerOptions{}))
|
||||
|
||||
// cli.AppHelpTemplate = HelpTemplate
|
||||
|
||||
app := &cli.App{
|
||||
Usage: "AWS management commands",
|
||||
Commands: []*cli.Command{
|
||||
cmd.HibernateCommand,
|
||||
cmd.UpdateACommand,
|
||||
cmd.SecretsCommand,
|
||||
},
|
||||
}
|
||||
|
||||
if err := app.Run(os.Args); err != nil {
|
||||
log.Error(err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
}
|
||||
19
cmd/hibernate/root.go
Normal file
19
cmd/hibernate/root.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"aws-mgmt/internal/cmd"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
app := cmd.HibernateApp
|
||||
|
||||
if err := app.Run(os.Args); err != nil {
|
||||
fmt.Fprintln(os.Stderr, err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
}
|
||||
19
cmd/secrets/root.go
Normal file
19
cmd/secrets/root.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"aws-mgmt/internal/cmd"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
app := cmd.SecretsApp
|
||||
|
||||
if err := app.Run(os.Args); err != nil {
|
||||
fmt.Fprintln(os.Stderr, err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
}
|
||||
18
cmd/update-a/root.go
Normal file
18
cmd/update-a/root.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"aws-mgmt/internal/cmd"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
app := cmd.UpdateAApp
|
||||
|
||||
if err := app.Run(os.Args); err != nil {
|
||||
fmt.Fprintln(os.Stderr, err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user