mirror of
https://codeberg.org/scip/ephemerup.git
synced 2025-12-17 20:50:56 +01:00
fix mod name, added tests
This commit is contained in:
@@ -19,8 +19,8 @@ package cmd
|
||||
import (
|
||||
"errors"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/tlinden/up/upctl/cfg"
|
||||
"github.com/tlinden/up/upctl/lib"
|
||||
"github.com/tlinden/cenophane/upctl/cfg"
|
||||
"github.com/tlinden/cenophane/upctl/lib"
|
||||
)
|
||||
|
||||
func DeleteCommand(conf *cfg.Config) *cobra.Command {
|
||||
|
||||
@@ -19,8 +19,8 @@ package cmd
|
||||
import (
|
||||
"errors"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/tlinden/up/upctl/cfg"
|
||||
"github.com/tlinden/up/upctl/lib"
|
||||
"github.com/tlinden/cenophane/upctl/cfg"
|
||||
"github.com/tlinden/cenophane/upctl/lib"
|
||||
)
|
||||
|
||||
func DescribeCommand(conf *cfg.Config) *cobra.Command {
|
||||
|
||||
@@ -19,8 +19,8 @@ package cmd
|
||||
import (
|
||||
"errors"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/tlinden/up/upctl/cfg"
|
||||
"github.com/tlinden/up/upctl/lib"
|
||||
"github.com/tlinden/cenophane/upctl/cfg"
|
||||
"github.com/tlinden/cenophane/upctl/lib"
|
||||
)
|
||||
|
||||
func DownloadCommand(conf *cfg.Config) *cobra.Command {
|
||||
|
||||
@@ -18,8 +18,8 @@ package cmd
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/tlinden/up/upctl/cfg"
|
||||
"github.com/tlinden/up/upctl/lib"
|
||||
"github.com/tlinden/cenophane/upctl/cfg"
|
||||
"github.com/tlinden/cenophane/upctl/lib"
|
||||
)
|
||||
|
||||
func ListCommand(conf *cfg.Config) *cobra.Command {
|
||||
|
||||
@@ -22,7 +22,7 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/pflag"
|
||||
"github.com/spf13/viper"
|
||||
"github.com/tlinden/up/upctl/cfg"
|
||||
"github.com/tlinden/cenophane/upctl/cfg"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
@@ -81,6 +81,7 @@ func Execute() {
|
||||
// options
|
||||
rootCmd.PersistentFlags().BoolVarP(&ShowVersion, "version", "v", false, "Print program version")
|
||||
rootCmd.PersistentFlags().BoolVarP(&conf.Debug, "debug", "d", false, "Enable debugging")
|
||||
rootCmd.PersistentFlags().BoolVarP(&conf.Silent, "silent", "s", false, "Disable progress bar and other noise")
|
||||
rootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "c", "", "custom config file")
|
||||
rootCmd.PersistentFlags().IntVarP(&conf.Retries, "retries", "r", 3, "How often shall we retry to access our endpoint")
|
||||
rootCmd.PersistentFlags().StringVarP(&conf.Endpoint, "endpoint", "p", "http://localhost:8080/api/v1", "upload api endpoint url")
|
||||
|
||||
@@ -19,8 +19,8 @@ package cmd
|
||||
import (
|
||||
"errors"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/tlinden/up/upctl/cfg"
|
||||
"github.com/tlinden/up/upctl/lib"
|
||||
"github.com/tlinden/cenophane/upctl/cfg"
|
||||
"github.com/tlinden/cenophane/upctl/lib"
|
||||
)
|
||||
|
||||
func UploadCommand(conf *cfg.Config) *cobra.Command {
|
||||
|
||||
Reference in New Issue
Block a user