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