mirror of
https://github.com/luscis/openlan.git
synced 2025-10-06 09:06:54 +08:00
30 lines
504 B
Go
Executable File
30 lines
504 B
Go
Executable File
package v6
|
|
|
|
import (
|
|
"github.com/luscis/openlan/cmd/api"
|
|
"github.com/luscis/openlan/pkg/database"
|
|
"github.com/urfave/cli/v2"
|
|
)
|
|
|
|
func Before(c *cli.Context) error {
|
|
if _, err := database.NewConfClient(nil); err == nil {
|
|
return nil
|
|
} else {
|
|
return err
|
|
}
|
|
}
|
|
|
|
func After(c *cli.Context) error {
|
|
return nil
|
|
}
|
|
|
|
func Commands(app *api.App) {
|
|
app.After = After
|
|
app.Before = Before
|
|
Switch{}.Commands(app)
|
|
Network{}.Commands(app)
|
|
Link{}.Commands(app)
|
|
Name{}.Commands(app)
|
|
Prefix{}.Commands(app)
|
|
}
|