Rename service package to command

This commit is contained in:
Thomas Boerger
2019-09-04 10:18:30 +02:00
parent 07a356c649
commit 66facde60a
5 changed files with 14 additions and 14 deletions

View File

@@ -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)
}
}

View File

@@ -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
}

View File

@@ -1,4 +1,4 @@
package service
package command
import (
"github.com/spf13/viper"

View File

@@ -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",

View File

@@ -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",