mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-06-19 21:39:02 -04:00
Rename service package to command
This commit is contained in:
@@ -3,11 +3,11 @@ package main
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/owncloud/reva-phoenix/pkg/service"
|
||||
"github.com/owncloud/reva-phoenix/pkg/command"
|
||||
)
|
||||
|
||||
func main() {
|
||||
if err := service.RootCommand().Execute(); err != nil {
|
||||
if err := command.Root().Execute(); err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package service
|
||||
package command
|
||||
|
||||
import (
|
||||
"os"
|
||||
@@ -11,8 +11,8 @@ import (
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
// RootCommand is the entry point for the reva-phoenix command.
|
||||
func RootCommand() *cobra.Command {
|
||||
// Root is the entry point for the reva-phoenix command.
|
||||
func Root() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "reva-phoenix",
|
||||
Short: "Reva service for phoenix",
|
||||
@@ -39,8 +39,8 @@ func RootCommand() *cobra.Command {
|
||||
viper.SetDefault("log.color", true)
|
||||
viper.BindEnv("log.color", "PHOENIX_LOG_COLOR")
|
||||
|
||||
cmd.AddCommand(ServerCommand())
|
||||
cmd.AddCommand(HealthCommand())
|
||||
cmd.AddCommand(Server())
|
||||
cmd.AddCommand(Health())
|
||||
|
||||
return cmd
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package service
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/spf13/viper"
|
||||
@@ -1,4 +1,4 @@
|
||||
package service
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/rs/zerolog/log"
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
// HealthCommand is the entrypoint for the health command.
|
||||
func HealthCommand() *cobra.Command {
|
||||
// Health is the entrypoint for the health command.
|
||||
func Health() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "health",
|
||||
Short: "Check health status",
|
||||
@@ -1,4 +1,4 @@
|
||||
package service
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/rs/zerolog/log"
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
// ServerCommand is the entrypoint for the server command.
|
||||
func ServerCommand() *cobra.Command {
|
||||
// Server is the entrypoint for the server command.
|
||||
func Server() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "server",
|
||||
Short: "Start integrated server",
|
||||
Reference in New Issue
Block a user