From feba83b494c294c18274fe8489ac14f44530b460 Mon Sep 17 00:00:00 2001 From: Tony Worm Date: Wed, 13 May 2020 19:56:01 -0600 Subject: [PATCH] upstream fixes --- cmd/hof/cmd/auth.go | 5 ++- cmd/hof/cmd/auth/login.go | 2 +- cmd/hof/cmd/config.go | 5 ++- cmd/hof/cmd/config/get.go | 2 +- cmd/hof/cmd/config/list.go | 2 +- cmd/hof/cmd/config/set.go | 2 +- cmd/hof/cmd/config/test.go | 2 +- cmd/hof/cmd/config/use.go | 2 +- cmd/hof/cmd/cue.go | 2 +- cmd/hof/cmd/gen.go | 2 +- cmd/hof/cmd/mod.go | 5 ++- cmd/hof/cmd/mod/convert.go | 2 +- cmd/hof/cmd/mod/graph.go | 2 +- cmd/hof/cmd/mod/hack.go | 2 +- cmd/hof/cmd/mod/info.go | 2 +- cmd/hof/cmd/mod/init.go | 2 +- cmd/hof/cmd/mod/status.go | 2 +- cmd/hof/cmd/mod/tidy.go | 2 +- cmd/hof/cmd/mod/vendor.go | 2 +- cmd/hof/cmd/mod/verify.go | 2 +- cmd/hof/cmd/new.go | 2 +- cmd/hof/cmd/root.go | 7 ++--- cmd/hof/cmd/run.go | 2 +- cmd/hof/cmd/studios.go | 5 ++- cmd/hof/cmd/studios/app.go | 5 ++- cmd/hof/cmd/studios/app/create.go | 2 +- cmd/hof/cmd/studios/app/delete.go | 2 +- cmd/hof/cmd/studios/app/deploy.go | 2 +- cmd/hof/cmd/studios/app/get.go | 2 +- cmd/hof/cmd/studios/app/list.go | 2 +- cmd/hof/cmd/studios/app/pull.go | 2 +- cmd/hof/cmd/studios/app/push.go | 2 +- cmd/hof/cmd/studios/app/reset.go | 2 +- cmd/hof/cmd/studios/app/shutdown.go | 2 +- cmd/hof/cmd/studios/app/status.go | 2 +- cmd/hof/cmd/studios/app/update.go | 2 +- cmd/hof/cmd/studios/config.go | 5 ++- cmd/hof/cmd/studios/config/create.go | 2 +- cmd/hof/cmd/studios/config/delete.go | 2 +- cmd/hof/cmd/studios/config/get.go | 2 +- cmd/hof/cmd/studios/config/list.go | 2 +- cmd/hof/cmd/studios/config/update.go | 2 +- cmd/hof/cmd/studios/container.go | 5 ++- cmd/hof/cmd/studios/container/call.go | 2 +- cmd/hof/cmd/studios/container/create.go | 2 +- cmd/hof/cmd/studios/container/delete.go | 2 +- cmd/hof/cmd/studios/container/deploy.go | 2 +- cmd/hof/cmd/studios/container/get.go | 2 +- cmd/hof/cmd/studios/container/list.go | 2 +- cmd/hof/cmd/studios/container/pull.go | 2 +- cmd/hof/cmd/studios/container/push.go | 2 +- cmd/hof/cmd/studios/container/reset.go | 2 +- cmd/hof/cmd/studios/container/shutdown.go | 2 +- cmd/hof/cmd/studios/container/status.go | 2 +- cmd/hof/cmd/studios/container/update.go | 2 +- cmd/hof/cmd/studios/database.go | 5 ++- cmd/hof/cmd/studios/database/create.go | 2 +- cmd/hof/cmd/studios/database/delete.go | 2 +- cmd/hof/cmd/studios/database/get.go | 2 +- cmd/hof/cmd/studios/database/list.go | 2 +- cmd/hof/cmd/studios/database/restore.go | 2 +- cmd/hof/cmd/studios/database/save.go | 2 +- cmd/hof/cmd/studios/database/status.go | 2 +- cmd/hof/cmd/studios/database/update.go | 2 +- cmd/hof/cmd/studios/function.go | 5 ++- cmd/hof/cmd/studios/function/call.go | 2 +- cmd/hof/cmd/studios/function/create.go | 2 +- cmd/hof/cmd/studios/function/delete.go | 2 +- cmd/hof/cmd/studios/function/deploy.go | 2 +- cmd/hof/cmd/studios/function/get.go | 2 +- cmd/hof/cmd/studios/function/list.go | 2 +- cmd/hof/cmd/studios/function/pull.go | 2 +- cmd/hof/cmd/studios/function/push.go | 2 +- cmd/hof/cmd/studios/function/reset.go | 2 +- cmd/hof/cmd/studios/function/shutdown.go | 2 +- cmd/hof/cmd/studios/function/status.go | 2 +- cmd/hof/cmd/studios/function/update.go | 2 +- cmd/hof/cmd/studios/secret.go | 5 ++- cmd/hof/cmd/studios/secret/create.go | 2 +- cmd/hof/cmd/studios/secret/delete.go | 2 +- cmd/hof/cmd/studios/secret/get.go | 2 +- cmd/hof/cmd/studios/secret/list.go | 2 +- cmd/hof/cmd/studios/secret/update.go | 2 +- cmd/hof/ga/ga.go | 38 ++++++++++++++--------- cue.mods | 4 +-- cue.sums | 4 +++ go.mod | 7 +++-- go.sum | 4 +++ 88 files changed, 133 insertions(+), 125 deletions(-) diff --git a/cmd/hof/cmd/auth.go b/cmd/hof/cmd/auth.go index cf1d683f4..c16c3f672 100644 --- a/cmd/hof/cmd/auth.go +++ b/cmd/hof/cmd/auth.go @@ -24,7 +24,7 @@ var AuthCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, } @@ -34,8 +34,7 @@ func init() { f := func(cmd *cobra.Command, args []string) { cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - as := strings.Join(args, "/") - ga.SendGaEvent(c+"/help", as, 0) + ga.SendGaEvent(c+"/help", "", 0) hf(cmd, args) } AuthCmd.SetHelpFunc(f) diff --git a/cmd/hof/cmd/auth/login.go b/cmd/hof/cmd/auth/login.go index 71aede1cc..997e6d94a 100644 --- a/cmd/hof/cmd/auth/login.go +++ b/cmd/hof/cmd/auth/login.go @@ -30,7 +30,7 @@ var LoginCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/config.go b/cmd/hof/cmd/config.go index cd18d004f..83fb886d1 100644 --- a/cmd/hof/cmd/config.go +++ b/cmd/hof/cmd/config.go @@ -24,7 +24,7 @@ var ConfigCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, } @@ -34,8 +34,7 @@ func init() { f := func(cmd *cobra.Command, args []string) { cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - as := strings.Join(args, "/") - ga.SendGaEvent(c+"/help", as, 0) + ga.SendGaEvent(c+"/help", "", 0) hf(cmd, args) } ConfigCmd.SetHelpFunc(f) diff --git a/cmd/hof/cmd/config/get.go b/cmd/hof/cmd/config/get.go index 9746f95e0..8ee49f18d 100644 --- a/cmd/hof/cmd/config/get.go +++ b/cmd/hof/cmd/config/get.go @@ -30,7 +30,7 @@ var GetCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/config/list.go b/cmd/hof/cmd/config/list.go index 11c38f941..89bccf0e9 100644 --- a/cmd/hof/cmd/config/list.go +++ b/cmd/hof/cmd/config/list.go @@ -30,7 +30,7 @@ var ListCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/config/set.go b/cmd/hof/cmd/config/set.go index bdfcebbc7..a32de34a0 100644 --- a/cmd/hof/cmd/config/set.go +++ b/cmd/hof/cmd/config/set.go @@ -30,7 +30,7 @@ var SetCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/config/test.go b/cmd/hof/cmd/config/test.go index 06736d695..93556913c 100644 --- a/cmd/hof/cmd/config/test.go +++ b/cmd/hof/cmd/config/test.go @@ -30,7 +30,7 @@ var TestCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/config/use.go b/cmd/hof/cmd/config/use.go index b968a9b93..74dd878df 100644 --- a/cmd/hof/cmd/config/use.go +++ b/cmd/hof/cmd/config/use.go @@ -30,7 +30,7 @@ var UseCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/cue.go b/cmd/hof/cmd/cue.go index a2caa6e93..da3c4f238 100644 --- a/cmd/hof/cmd/cue.go +++ b/cmd/hof/cmd/cue.go @@ -34,7 +34,7 @@ var CueCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/gen.go b/cmd/hof/cmd/gen.go index 33906611d..3d47c4d9e 100644 --- a/cmd/hof/cmd/gen.go +++ b/cmd/hof/cmd/gen.go @@ -53,7 +53,7 @@ var GenCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/mod.go b/cmd/hof/cmd/mod.go index aa6c9117c..4601235cd 100644 --- a/cmd/hof/cmd/mod.go +++ b/cmd/hof/cmd/mod.go @@ -36,7 +36,7 @@ var ModCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, @@ -58,8 +58,7 @@ func init() { f := func(cmd *cobra.Command, args []string) { cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - as := strings.Join(args, "/") - ga.SendGaEvent(c+"/help", as, 0) + ga.SendGaEvent(c+"/help", "", 0) hf(cmd, args) } ModCmd.SetHelpFunc(f) diff --git a/cmd/hof/cmd/mod/convert.go b/cmd/hof/cmd/mod/convert.go index 766c654c4..2ca47d67a 100644 --- a/cmd/hof/cmd/mod/convert.go +++ b/cmd/hof/cmd/mod/convert.go @@ -38,7 +38,7 @@ var ConvertCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/mod/graph.go b/cmd/hof/cmd/mod/graph.go index 89ccc61a5..5852bc287 100644 --- a/cmd/hof/cmd/mod/graph.go +++ b/cmd/hof/cmd/mod/graph.go @@ -38,7 +38,7 @@ var GraphCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/mod/hack.go b/cmd/hof/cmd/mod/hack.go index 7fd0b65cc..a0d532961 100644 --- a/cmd/hof/cmd/mod/hack.go +++ b/cmd/hof/cmd/mod/hack.go @@ -40,7 +40,7 @@ var HackCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/mod/info.go b/cmd/hof/cmd/mod/info.go index 8a7f92e09..b52a645c4 100644 --- a/cmd/hof/cmd/mod/info.go +++ b/cmd/hof/cmd/mod/info.go @@ -41,7 +41,7 @@ var InfoCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/mod/init.go b/cmd/hof/cmd/mod/init.go index 364e06c69..76b42a48c 100644 --- a/cmd/hof/cmd/mod/init.go +++ b/cmd/hof/cmd/mod/init.go @@ -38,7 +38,7 @@ var InitCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/mod/status.go b/cmd/hof/cmd/mod/status.go index 88ab62a80..2eac92169 100644 --- a/cmd/hof/cmd/mod/status.go +++ b/cmd/hof/cmd/mod/status.go @@ -38,7 +38,7 @@ var StatusCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/mod/tidy.go b/cmd/hof/cmd/mod/tidy.go index e07b5ec96..1ca9ead5a 100644 --- a/cmd/hof/cmd/mod/tidy.go +++ b/cmd/hof/cmd/mod/tidy.go @@ -38,7 +38,7 @@ var TidyCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/mod/vendor.go b/cmd/hof/cmd/mod/vendor.go index db35f2e3c..f26b8bae5 100644 --- a/cmd/hof/cmd/mod/vendor.go +++ b/cmd/hof/cmd/mod/vendor.go @@ -38,7 +38,7 @@ var VendorCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/mod/verify.go b/cmd/hof/cmd/mod/verify.go index 4833c9a90..037bc7a85 100644 --- a/cmd/hof/cmd/mod/verify.go +++ b/cmd/hof/cmd/mod/verify.go @@ -38,7 +38,7 @@ var VerifyCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/new.go b/cmd/hof/cmd/new.go index 3c44ac1b7..5528fcae5 100644 --- a/cmd/hof/cmd/new.go +++ b/cmd/hof/cmd/new.go @@ -30,7 +30,7 @@ var NewCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/root.go b/cmd/hof/cmd/root.go index 1b23b178e..ff5ea0cf1 100644 --- a/cmd/hof/cmd/root.go +++ b/cmd/hof/cmd/root.go @@ -4,8 +4,6 @@ import ( "fmt" "os" - "strings" - "github.com/spf13/cobra" // "github.com/spf13/viper" @@ -57,7 +55,7 @@ var RootCmd = &cobra.Command{ PreRun: func(cmd *cobra.Command, args []string) { - ga.SendGaEvent("root", strings.Join(args, "/"), 0) + ga.SendGaEvent("root", "", 0) }, } @@ -67,8 +65,7 @@ func init() { hf := RootCmd.HelpFunc() f := func(cmd *cobra.Command, args []string) { if RootCmd.Name() == cmd.Name() { - as := strings.Join(args, "/") - ga.SendGaEvent("root/help", as, 0) + ga.SendGaEvent("root/help", "", 0) } hf(cmd, args) } diff --git a/cmd/hof/cmd/run.go b/cmd/hof/cmd/run.go index 68ab53eab..3dbaff14f 100644 --- a/cmd/hof/cmd/run.go +++ b/cmd/hof/cmd/run.go @@ -40,7 +40,7 @@ var RunCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios.go b/cmd/hof/cmd/studios.go index f0f9cf8c2..f836ee1a7 100644 --- a/cmd/hof/cmd/studios.go +++ b/cmd/hof/cmd/studios.go @@ -29,7 +29,7 @@ var StudiosCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, } @@ -39,8 +39,7 @@ func init() { f := func(cmd *cobra.Command, args []string) { cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - as := strings.Join(args, "/") - ga.SendGaEvent(c+"/help", as, 0) + ga.SendGaEvent(c+"/help", "", 0) hf(cmd, args) } StudiosCmd.SetHelpFunc(f) diff --git a/cmd/hof/cmd/studios/app.go b/cmd/hof/cmd/studios/app.go index b7cab0654..d65d21ab0 100644 --- a/cmd/hof/cmd/studios/app.go +++ b/cmd/hof/cmd/studios/app.go @@ -32,7 +32,7 @@ var AppCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, @@ -54,8 +54,7 @@ func init() { f := func(cmd *cobra.Command, args []string) { cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - as := strings.Join(args, "/") - ga.SendGaEvent(c+"/help", as, 0) + ga.SendGaEvent(c+"/help", "", 0) hf(cmd, args) } AppCmd.SetHelpFunc(f) diff --git a/cmd/hof/cmd/studios/app/create.go b/cmd/hof/cmd/studios/app/create.go index d99af0ff0..acef19bc0 100644 --- a/cmd/hof/cmd/studios/app/create.go +++ b/cmd/hof/cmd/studios/app/create.go @@ -30,7 +30,7 @@ var CreateCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/app/delete.go b/cmd/hof/cmd/studios/app/delete.go index 7eae138b9..9d3388423 100644 --- a/cmd/hof/cmd/studios/app/delete.go +++ b/cmd/hof/cmd/studios/app/delete.go @@ -30,7 +30,7 @@ var DeleteCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/app/deploy.go b/cmd/hof/cmd/studios/app/deploy.go index 1359e552a..01f2668e0 100644 --- a/cmd/hof/cmd/studios/app/deploy.go +++ b/cmd/hof/cmd/studios/app/deploy.go @@ -30,7 +30,7 @@ var DeployCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/app/get.go b/cmd/hof/cmd/studios/app/get.go index e80bada38..7115ec1da 100644 --- a/cmd/hof/cmd/studios/app/get.go +++ b/cmd/hof/cmd/studios/app/get.go @@ -30,7 +30,7 @@ var GetCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/app/list.go b/cmd/hof/cmd/studios/app/list.go index df9d62b0f..8211e972f 100644 --- a/cmd/hof/cmd/studios/app/list.go +++ b/cmd/hof/cmd/studios/app/list.go @@ -30,7 +30,7 @@ var ListCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/app/pull.go b/cmd/hof/cmd/studios/app/pull.go index 03a6dd45d..f581b5e45 100644 --- a/cmd/hof/cmd/studios/app/pull.go +++ b/cmd/hof/cmd/studios/app/pull.go @@ -30,7 +30,7 @@ var PullCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/app/push.go b/cmd/hof/cmd/studios/app/push.go index b8283d7c1..a697c8860 100644 --- a/cmd/hof/cmd/studios/app/push.go +++ b/cmd/hof/cmd/studios/app/push.go @@ -30,7 +30,7 @@ var PushCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/app/reset.go b/cmd/hof/cmd/studios/app/reset.go index 7d2b1b238..ad5597aef 100644 --- a/cmd/hof/cmd/studios/app/reset.go +++ b/cmd/hof/cmd/studios/app/reset.go @@ -30,7 +30,7 @@ var ResetCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/app/shutdown.go b/cmd/hof/cmd/studios/app/shutdown.go index 0e8ada86a..6d4302781 100644 --- a/cmd/hof/cmd/studios/app/shutdown.go +++ b/cmd/hof/cmd/studios/app/shutdown.go @@ -30,7 +30,7 @@ var ShutdownCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/app/status.go b/cmd/hof/cmd/studios/app/status.go index 741df2354..064d60859 100644 --- a/cmd/hof/cmd/studios/app/status.go +++ b/cmd/hof/cmd/studios/app/status.go @@ -30,7 +30,7 @@ var StatusCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/app/update.go b/cmd/hof/cmd/studios/app/update.go index 202f8e42c..7c1f4b911 100644 --- a/cmd/hof/cmd/studios/app/update.go +++ b/cmd/hof/cmd/studios/app/update.go @@ -30,7 +30,7 @@ var UpdateCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/config.go b/cmd/hof/cmd/studios/config.go index bc0c7a706..5adfa223b 100644 --- a/cmd/hof/cmd/studios/config.go +++ b/cmd/hof/cmd/studios/config.go @@ -36,7 +36,7 @@ var ConfigCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, @@ -58,8 +58,7 @@ func init() { f := func(cmd *cobra.Command, args []string) { cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - as := strings.Join(args, "/") - ga.SendGaEvent(c+"/help", as, 0) + ga.SendGaEvent(c+"/help", "", 0) hf(cmd, args) } ConfigCmd.SetHelpFunc(f) diff --git a/cmd/hof/cmd/studios/config/create.go b/cmd/hof/cmd/studios/config/create.go index 3c170b4cb..45c41eff9 100644 --- a/cmd/hof/cmd/studios/config/create.go +++ b/cmd/hof/cmd/studios/config/create.go @@ -30,7 +30,7 @@ var CreateCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/config/delete.go b/cmd/hof/cmd/studios/config/delete.go index 40a0719e6..f5c4fc1a5 100644 --- a/cmd/hof/cmd/studios/config/delete.go +++ b/cmd/hof/cmd/studios/config/delete.go @@ -30,7 +30,7 @@ var DeleteCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/config/get.go b/cmd/hof/cmd/studios/config/get.go index e36532a5a..110b14419 100644 --- a/cmd/hof/cmd/studios/config/get.go +++ b/cmd/hof/cmd/studios/config/get.go @@ -30,7 +30,7 @@ var GetCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/config/list.go b/cmd/hof/cmd/studios/config/list.go index 6b2d95c7b..84d7f14bd 100644 --- a/cmd/hof/cmd/studios/config/list.go +++ b/cmd/hof/cmd/studios/config/list.go @@ -30,7 +30,7 @@ var ListCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/config/update.go b/cmd/hof/cmd/studios/config/update.go index c08a942d1..dd0028773 100644 --- a/cmd/hof/cmd/studios/config/update.go +++ b/cmd/hof/cmd/studios/config/update.go @@ -30,7 +30,7 @@ var UpdateCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/container.go b/cmd/hof/cmd/studios/container.go index af6af9d61..61f722d89 100644 --- a/cmd/hof/cmd/studios/container.go +++ b/cmd/hof/cmd/studios/container.go @@ -36,7 +36,7 @@ var ContainerCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, @@ -58,8 +58,7 @@ func init() { f := func(cmd *cobra.Command, args []string) { cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - as := strings.Join(args, "/") - ga.SendGaEvent(c+"/help", as, 0) + ga.SendGaEvent(c+"/help", "", 0) hf(cmd, args) } ContainerCmd.SetHelpFunc(f) diff --git a/cmd/hof/cmd/studios/container/call.go b/cmd/hof/cmd/studios/container/call.go index c1e9e24b2..749a46dd3 100644 --- a/cmd/hof/cmd/studios/container/call.go +++ b/cmd/hof/cmd/studios/container/call.go @@ -30,7 +30,7 @@ var CallCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/container/create.go b/cmd/hof/cmd/studios/container/create.go index 5e339ddaa..137842bcd 100644 --- a/cmd/hof/cmd/studios/container/create.go +++ b/cmd/hof/cmd/studios/container/create.go @@ -30,7 +30,7 @@ var CreateCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/container/delete.go b/cmd/hof/cmd/studios/container/delete.go index 319612a2d..c1c679d05 100644 --- a/cmd/hof/cmd/studios/container/delete.go +++ b/cmd/hof/cmd/studios/container/delete.go @@ -30,7 +30,7 @@ var DeleteCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/container/deploy.go b/cmd/hof/cmd/studios/container/deploy.go index 629d587ee..23a15bf31 100644 --- a/cmd/hof/cmd/studios/container/deploy.go +++ b/cmd/hof/cmd/studios/container/deploy.go @@ -30,7 +30,7 @@ var DeployCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/container/get.go b/cmd/hof/cmd/studios/container/get.go index 3b202d56d..326c3613c 100644 --- a/cmd/hof/cmd/studios/container/get.go +++ b/cmd/hof/cmd/studios/container/get.go @@ -30,7 +30,7 @@ var GetCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/container/list.go b/cmd/hof/cmd/studios/container/list.go index 03bbd051a..51cb282a9 100644 --- a/cmd/hof/cmd/studios/container/list.go +++ b/cmd/hof/cmd/studios/container/list.go @@ -30,7 +30,7 @@ var ListCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/container/pull.go b/cmd/hof/cmd/studios/container/pull.go index 25dbf4728..c95f11826 100644 --- a/cmd/hof/cmd/studios/container/pull.go +++ b/cmd/hof/cmd/studios/container/pull.go @@ -30,7 +30,7 @@ var PullCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/container/push.go b/cmd/hof/cmd/studios/container/push.go index da2f6358f..45ffd0e8a 100644 --- a/cmd/hof/cmd/studios/container/push.go +++ b/cmd/hof/cmd/studios/container/push.go @@ -30,7 +30,7 @@ var PushCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/container/reset.go b/cmd/hof/cmd/studios/container/reset.go index 0cd4befaf..964a645de 100644 --- a/cmd/hof/cmd/studios/container/reset.go +++ b/cmd/hof/cmd/studios/container/reset.go @@ -30,7 +30,7 @@ var ResetCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/container/shutdown.go b/cmd/hof/cmd/studios/container/shutdown.go index 838b57853..8c5bb8407 100644 --- a/cmd/hof/cmd/studios/container/shutdown.go +++ b/cmd/hof/cmd/studios/container/shutdown.go @@ -30,7 +30,7 @@ var ShutdownCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/container/status.go b/cmd/hof/cmd/studios/container/status.go index f3d4a3eb8..204af222d 100644 --- a/cmd/hof/cmd/studios/container/status.go +++ b/cmd/hof/cmd/studios/container/status.go @@ -30,7 +30,7 @@ var StatusCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/container/update.go b/cmd/hof/cmd/studios/container/update.go index b7288410f..dc126e8cc 100644 --- a/cmd/hof/cmd/studios/container/update.go +++ b/cmd/hof/cmd/studios/container/update.go @@ -30,7 +30,7 @@ var UpdateCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/database.go b/cmd/hof/cmd/studios/database.go index 6a1eb4920..447a8a020 100644 --- a/cmd/hof/cmd/studios/database.go +++ b/cmd/hof/cmd/studios/database.go @@ -32,7 +32,7 @@ var DatabaseCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, @@ -54,8 +54,7 @@ func init() { f := func(cmd *cobra.Command, args []string) { cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - as := strings.Join(args, "/") - ga.SendGaEvent(c+"/help", as, 0) + ga.SendGaEvent(c+"/help", "", 0) hf(cmd, args) } DatabaseCmd.SetHelpFunc(f) diff --git a/cmd/hof/cmd/studios/database/create.go b/cmd/hof/cmd/studios/database/create.go index c9d56a405..4cb71aa9b 100644 --- a/cmd/hof/cmd/studios/database/create.go +++ b/cmd/hof/cmd/studios/database/create.go @@ -30,7 +30,7 @@ var CreateCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/database/delete.go b/cmd/hof/cmd/studios/database/delete.go index 11cc9ded8..43aad0b97 100644 --- a/cmd/hof/cmd/studios/database/delete.go +++ b/cmd/hof/cmd/studios/database/delete.go @@ -30,7 +30,7 @@ var DeleteCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/database/get.go b/cmd/hof/cmd/studios/database/get.go index 0277681c7..49b6d6fd3 100644 --- a/cmd/hof/cmd/studios/database/get.go +++ b/cmd/hof/cmd/studios/database/get.go @@ -30,7 +30,7 @@ var GetCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/database/list.go b/cmd/hof/cmd/studios/database/list.go index 790accf5f..cbf3de0df 100644 --- a/cmd/hof/cmd/studios/database/list.go +++ b/cmd/hof/cmd/studios/database/list.go @@ -30,7 +30,7 @@ var ListCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/database/restore.go b/cmd/hof/cmd/studios/database/restore.go index e19c42327..35b85d8ef 100644 --- a/cmd/hof/cmd/studios/database/restore.go +++ b/cmd/hof/cmd/studios/database/restore.go @@ -30,7 +30,7 @@ var RestoreCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/database/save.go b/cmd/hof/cmd/studios/database/save.go index fef7632bd..3d8142d33 100644 --- a/cmd/hof/cmd/studios/database/save.go +++ b/cmd/hof/cmd/studios/database/save.go @@ -30,7 +30,7 @@ var SaveCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/database/status.go b/cmd/hof/cmd/studios/database/status.go index a574dbd4d..c0db61aa4 100644 --- a/cmd/hof/cmd/studios/database/status.go +++ b/cmd/hof/cmd/studios/database/status.go @@ -30,7 +30,7 @@ var StatusCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/database/update.go b/cmd/hof/cmd/studios/database/update.go index e8b764d28..4a3eb995c 100644 --- a/cmd/hof/cmd/studios/database/update.go +++ b/cmd/hof/cmd/studios/database/update.go @@ -30,7 +30,7 @@ var UpdateCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/function.go b/cmd/hof/cmd/studios/function.go index 5f3d85f19..21bb23a29 100644 --- a/cmd/hof/cmd/studios/function.go +++ b/cmd/hof/cmd/studios/function.go @@ -36,7 +36,7 @@ var FunctionCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, @@ -58,8 +58,7 @@ func init() { f := func(cmd *cobra.Command, args []string) { cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - as := strings.Join(args, "/") - ga.SendGaEvent(c+"/help", as, 0) + ga.SendGaEvent(c+"/help", "", 0) hf(cmd, args) } FunctionCmd.SetHelpFunc(f) diff --git a/cmd/hof/cmd/studios/function/call.go b/cmd/hof/cmd/studios/function/call.go index 70b9e1f1e..6e2f35943 100644 --- a/cmd/hof/cmd/studios/function/call.go +++ b/cmd/hof/cmd/studios/function/call.go @@ -30,7 +30,7 @@ var CallCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/function/create.go b/cmd/hof/cmd/studios/function/create.go index 41e3d0f41..5c3e44301 100644 --- a/cmd/hof/cmd/studios/function/create.go +++ b/cmd/hof/cmd/studios/function/create.go @@ -30,7 +30,7 @@ var CreateCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/function/delete.go b/cmd/hof/cmd/studios/function/delete.go index cc8742002..9c59be983 100644 --- a/cmd/hof/cmd/studios/function/delete.go +++ b/cmd/hof/cmd/studios/function/delete.go @@ -30,7 +30,7 @@ var DeleteCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/function/deploy.go b/cmd/hof/cmd/studios/function/deploy.go index bff3d1d7e..ffe9421d5 100644 --- a/cmd/hof/cmd/studios/function/deploy.go +++ b/cmd/hof/cmd/studios/function/deploy.go @@ -30,7 +30,7 @@ var DeployCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/function/get.go b/cmd/hof/cmd/studios/function/get.go index cc3664e3c..cfa9b54cc 100644 --- a/cmd/hof/cmd/studios/function/get.go +++ b/cmd/hof/cmd/studios/function/get.go @@ -30,7 +30,7 @@ var GetCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/function/list.go b/cmd/hof/cmd/studios/function/list.go index 0e2ab77ce..1bc799d52 100644 --- a/cmd/hof/cmd/studios/function/list.go +++ b/cmd/hof/cmd/studios/function/list.go @@ -30,7 +30,7 @@ var ListCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/function/pull.go b/cmd/hof/cmd/studios/function/pull.go index b214260dd..b84c76e65 100644 --- a/cmd/hof/cmd/studios/function/pull.go +++ b/cmd/hof/cmd/studios/function/pull.go @@ -30,7 +30,7 @@ var PullCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/function/push.go b/cmd/hof/cmd/studios/function/push.go index 6f5f1033e..2bc0d750d 100644 --- a/cmd/hof/cmd/studios/function/push.go +++ b/cmd/hof/cmd/studios/function/push.go @@ -30,7 +30,7 @@ var PushCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/function/reset.go b/cmd/hof/cmd/studios/function/reset.go index 634171cf8..954f8843f 100644 --- a/cmd/hof/cmd/studios/function/reset.go +++ b/cmd/hof/cmd/studios/function/reset.go @@ -30,7 +30,7 @@ var ResetCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/function/shutdown.go b/cmd/hof/cmd/studios/function/shutdown.go index 6db2fd0c8..49cb6550e 100644 --- a/cmd/hof/cmd/studios/function/shutdown.go +++ b/cmd/hof/cmd/studios/function/shutdown.go @@ -30,7 +30,7 @@ var ShutdownCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/function/status.go b/cmd/hof/cmd/studios/function/status.go index 71e4491ed..5d1485927 100644 --- a/cmd/hof/cmd/studios/function/status.go +++ b/cmd/hof/cmd/studios/function/status.go @@ -30,7 +30,7 @@ var StatusCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/function/update.go b/cmd/hof/cmd/studios/function/update.go index dd0a4a0c0..019e3528e 100644 --- a/cmd/hof/cmd/studios/function/update.go +++ b/cmd/hof/cmd/studios/function/update.go @@ -30,7 +30,7 @@ var UpdateCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/secret.go b/cmd/hof/cmd/studios/secret.go index 7098dc76c..fba70eb3a 100644 --- a/cmd/hof/cmd/studios/secret.go +++ b/cmd/hof/cmd/studios/secret.go @@ -37,7 +37,7 @@ var SecretCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, @@ -59,8 +59,7 @@ func init() { f := func(cmd *cobra.Command, args []string) { cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - as := strings.Join(args, "/") - ga.SendGaEvent(c+"/help", as, 0) + ga.SendGaEvent(c+"/help", "", 0) hf(cmd, args) } SecretCmd.SetHelpFunc(f) diff --git a/cmd/hof/cmd/studios/secret/create.go b/cmd/hof/cmd/studios/secret/create.go index c28011408..a8c846f6a 100644 --- a/cmd/hof/cmd/studios/secret/create.go +++ b/cmd/hof/cmd/studios/secret/create.go @@ -30,7 +30,7 @@ var CreateCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/secret/delete.go b/cmd/hof/cmd/studios/secret/delete.go index b6ec45ee7..0efff8e18 100644 --- a/cmd/hof/cmd/studios/secret/delete.go +++ b/cmd/hof/cmd/studios/secret/delete.go @@ -30,7 +30,7 @@ var DeleteCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/secret/get.go b/cmd/hof/cmd/studios/secret/get.go index 5cc546478..dcc7556fd 100644 --- a/cmd/hof/cmd/studios/secret/get.go +++ b/cmd/hof/cmd/studios/secret/get.go @@ -30,7 +30,7 @@ var GetCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/secret/list.go b/cmd/hof/cmd/studios/secret/list.go index 27d5bd46b..1165fd6c6 100644 --- a/cmd/hof/cmd/studios/secret/list.go +++ b/cmd/hof/cmd/studios/secret/list.go @@ -30,7 +30,7 @@ var ListCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/cmd/studios/secret/update.go b/cmd/hof/cmd/studios/secret/update.go index 2b86a0c32..c7fd98da9 100644 --- a/cmd/hof/cmd/studios/secret/update.go +++ b/cmd/hof/cmd/studios/secret/update.go @@ -30,7 +30,7 @@ var UpdateCmd = &cobra.Command{ cs := strings.Fields(cmd.CommandPath()) c := strings.Join(cs[1:], "/") - ga.SendGaEvent(c, strings.Join(args, "/"), 0) + ga.SendGaEvent(c, "", 0) }, diff --git a/cmd/hof/ga/ga.go b/cmd/hof/ga/ga.go index 8a8815cf5..bb654e62d 100644 --- a/cmd/hof/ga/ga.go +++ b/cmd/hof/ga/ga.go @@ -13,20 +13,27 @@ import ( ) func SendGaEvent(action, label string, value int) { - // Do something here to lookup / create - // cid := "13b3ad64-9154-11ea-9eba-47f617ab74f7" + if os.Getenv("HOF_TELEMETRY_DISABLED") != "" { + return + } + cid, err := readGaId() if err != nil { - fmt.Println("Error", err) cid = "unknown" } + ua := fmt.Sprintf( + "%s/%s %s/%s", + "hof", verinfo.Version, + verinfo.BuildOS, verinfo.BuildArch, + ) + cfg := yagu.GaConfig{ TID: "UA-103579574-5", CID: cid, - UA: "hof/" + verinfo.Version, + UA: ua, CN: "hof", - CS: "hof", + CS: "hof/" + verinfo.Version, CM: verinfo.Version, } @@ -45,11 +52,15 @@ func SendGaEvent(action, label string, value int) { } func readGaId() (string, error) { - ucd := yagu.UserHomeDir() + // ucd := yagu.UserHomeDir() + ucd, err := os.UserConfigDir() + if err != nil { + return "", err + } dir := filepath.Join(ucd, ".hof") fn := filepath.Join(dir, ".uuid") - _, err := os.Lstat(fn) + _, err = os.Lstat(fn) if err != nil { // file does not exist, probably... return writeGaId() @@ -64,16 +75,17 @@ func readGaId() (string, error) { } func writeGaId() (string, error) { - // fmt.Println("writeGaId") - ucd := yagu.UserHomeDir() - dir := filepath.Join(ucd, ".hof") - err := yagu.Mkdir(dir) + ucd, err := os.UserConfigDir() if err != nil { return "", err } - // fmt.Println("Mkdir:", dir) + dir := filepath.Join(ucd, ".hof") + err = yagu.Mkdir(dir) + if err != nil { + return "", err + } fn := filepath.Join(dir, ".uuid") @@ -82,8 +94,6 @@ func writeGaId() (string, error) { return id.String(), err } - // fmt.Println("writeGaId: ", id.String()) - err = ioutil.WriteFile(fn, []byte(id.String()), 0644) if err != nil { return id.String(), err diff --git a/cue.mods b/cue.mods index 7ac368ea2..ed2037499 100644 --- a/cue.mods +++ b/cue.mods @@ -3,6 +3,6 @@ module github.com/hofstadter-io/hof cue master require ( - github.com/hofstadter-io/hofmod-cli v0.5.2 - github.com/hofstadter-io/mvs v0.7.0 + github.com/hofstadter-io/hofmod-cli v0.5.3 + github.com/hofstadter-io/mvs v0.7.2 ) diff --git a/cue.sums b/cue.sums index 7210fbfe5..0412cef52 100644 --- a/cue.sums +++ b/cue.sums @@ -12,6 +12,8 @@ github.com/hofstadter-io/hofmod-cli v0.5.0 h1:hZT2BUWJftP9jq32bcOElXg1N9oXEFJCK9 github.com/hofstadter-io/hofmod-cli v0.5.0/cue.mods h1:8TVLRMLOvfcVRZu6NqDr4VFmvuw/9Ca7YpCMo1fTRmU= github.com/hofstadter-io/hofmod-cli v0.5.2 h1:LAtrhhLOnuPaAS/P+5E+9Rgq0XmcpRBwuS4iisKZQ1M= github.com/hofstadter-io/hofmod-cli v0.5.2/cue.mods h1:8TVLRMLOvfcVRZu6NqDr4VFmvuw/9Ca7YpCMo1fTRmU= +github.com/hofstadter-io/hofmod-cli v0.5.3 h1:9QcITvHncO6lWHezRnM1YXkVTula6sfsHEQXQh2LI+E= +github.com/hofstadter-io/hofmod-cli v0.5.3/cue.mods h1:8TVLRMLOvfcVRZu6NqDr4VFmvuw/9Ca7YpCMo1fTRmU= github.com/hofstadter-io/mvs v0.0.0 h1:/rMWV7c92qpH/hyl8Ibi/DSUhrGDgDeKBtFkZeD+SMo= github.com/hofstadter-io/mvs v0.0.0/cue.mods h1:Bt+zMXYlsncBuI+lyMWfRLObqOt+HNOCAO/DDh1Mf+M= github.com/hofstadter-io/mvs v0.4.4 h1:hw65QjfvxPjeUimqurEbTuwnDLSj/GUABKsHUymaW2g= @@ -26,3 +28,5 @@ github.com/hofstadter-io/mvs v0.5.1 h1:t67DJuloFZir82jxs+d5AjyZP0vy/uST7fv9mItph github.com/hofstadter-io/mvs v0.5.1/cue.mods h1:3zTO9yBRvH0ML28h37/T/hWbOFG9d09eR1rTNKn60PU= github.com/hofstadter-io/mvs v0.7.0 h1:WaI9fpQIoRHsIzUFFUYQa1AmEsTlrzTNhBx+ejRdqp8= github.com/hofstadter-io/mvs v0.7.0/cue.mods h1:yHRCi1Mkf1WGBefRDBFILqHSdG8HH58/QcA0IcY7sks= +github.com/hofstadter-io/mvs v0.7.2 h1:i7WDMFGeLKJNwRaMyz4YXN5jiGPdU8ANXY8SpYbWG1E= +github.com/hofstadter-io/mvs v0.7.2/cue.mods h1:9D3ktQO3sJBuq1pXN8JVkH9bSsPfnvWNYhbpqkZoPdc= diff --git a/go.mod b/go.mod index 504bd02f0..f89428b56 100644 --- a/go.mod +++ b/go.mod @@ -19,9 +19,9 @@ require ( github.com/google/uuid v1.1.1 github.com/hofstadter-io/data-utils v0.0.0-20200128210141-0a3e569b27ed github.com/hofstadter-io/dotpath v0.0.0-20191027071558-52e2819b7d2d - github.com/hofstadter-io/mvs v0.7.0 + github.com/hofstadter-io/mvs v0.7.2 github.com/hofstadter-io/structural v0.1.2 // indirect - github.com/hofstadter-io/yagu v0.0.1 + github.com/hofstadter-io/yagu v0.0.3 github.com/kr/pretty v0.1.0 github.com/mattn/go-zglob v0.0.1 github.com/mholt/archiver v3.1.1+incompatible @@ -45,3 +45,6 @@ require ( gopkg.in/src-d/go-git.v4 v4.13.1 gopkg.in/yaml.v2 v2.2.8 ) + +replace cuelang.org/go => ../../../cue/cue + diff --git a/go.sum b/go.sum index 475d77a92..01d072f5d 100644 --- a/go.sum +++ b/go.sum @@ -119,10 +119,14 @@ github.com/hofstadter-io/mvs v0.6.0 h1:QDqGHaq+3Yna/dMSScFJ2Ou/AmYivHgItoC4ugKKv github.com/hofstadter-io/mvs v0.6.0/go.mod h1:Cvq23OVa/x1wA720bNCHPgvNuS5+4g2ZWFsWgXfLMUU= github.com/hofstadter-io/mvs v0.7.0 h1:nBPwfK1wY7NFMlGooYkiXNE6rqbtr4maGtmDU/rmRno= github.com/hofstadter-io/mvs v0.7.0/go.mod h1:EJm3JgN0ogwttI5KsKVx1V+Nf3lBctDSCJAirph37YQ= +github.com/hofstadter-io/mvs v0.7.2 h1:SM88LC28Ldd8bkOYB5OYVkkwKES0TxLmosTaM3rW98c= +github.com/hofstadter-io/mvs v0.7.2/go.mod h1:Nt41lfR7rrqMf9SVjgDy4eoN8PJne+iL8CRI2Po4vQA= github.com/hofstadter-io/structural v0.1.0/go.mod h1:9TuYfLVHsi8pkqfz7K2SYiE8OAmog7KyX/IHy4BzjRM= github.com/hofstadter-io/structural v0.1.2/go.mod h1:aBIZ/puy20x0pol1GrIkWg1cy+4+h9pLCBn4NY32z5A= github.com/hofstadter-io/yagu v0.0.1 h1:WNtWyXH2vu8C/Il7R2itvgFHHLy/WLqzbm+A+yPYFSc= github.com/hofstadter-io/yagu v0.0.1/go.mod h1:UWTxRZtLMwWDfYcKPaWS6Bc4VZT+ue5P6yJcpS323rM= +github.com/hofstadter-io/yagu v0.0.3 h1:VheQUfbnC7IJ93BN5d1BFBEr6r3CN7loVcG/EpW690o= +github.com/hofstadter-io/yagu v0.0.3/go.mod h1:UWTxRZtLMwWDfYcKPaWS6Bc4VZT+ue5P6yJcpS323rM= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=