From 7743583f4da05aeeab215a5b634f50df8bbbb3c7 Mon Sep 17 00:00:00 2001 From: Ari <36749814+ari-hacks@users.noreply.github.com> Date: Wed, 28 Oct 2020 06:14:35 +0000 Subject: [PATCH] in-progress golint warning fixes (#1799) Co-authored-by: Vishal --- pkg/fission-cli/cmd/canaryconfig/command.go | 1 + pkg/fission-cli/cmd/support/command.go | 1 + pkg/router/analytics.go | 3 +++ 3 files changed, 5 insertions(+) diff --git a/pkg/fission-cli/cmd/canaryconfig/command.go b/pkg/fission-cli/cmd/canaryconfig/command.go index d5c9e679..782a315e 100644 --- a/pkg/fission-cli/cmd/canaryconfig/command.go +++ b/pkg/fission-cli/cmd/canaryconfig/command.go @@ -23,6 +23,7 @@ import ( "github.com/fission/fission/pkg/fission-cli/flag" ) +//Commands returns canary config commands func Commands() *cobra.Command { createCmd := &cobra.Command{ Use: "create", diff --git a/pkg/fission-cli/cmd/support/command.go b/pkg/fission-cli/cmd/support/command.go index 706d6f66..faf9b067 100644 --- a/pkg/fission-cli/cmd/support/command.go +++ b/pkg/fission-cli/cmd/support/command.go @@ -23,6 +23,7 @@ import ( "github.com/fission/fission/pkg/fission-cli/flag" ) +//Commands returns support commands func Commands() *cobra.Command { dumpCmd := &cobra.Command{ Use: "dump", diff --git a/pkg/router/analytics.go b/pkg/router/analytics.go index 76c4a1cf..dc4985e4 100644 --- a/pkg/router/analytics.go +++ b/pkg/router/analytics.go @@ -12,16 +12,19 @@ import ( ) type ( + // Analytics struct Analytics struct { id string url string } + // AnalyticsData struct AnalyticsData struct { ID string `json:"ID"` FunctionCallCount uint64 `json:"FunctionCallCount"` } ) +// MakeAnalytics returns Analytics if url is not empty func MakeAnalytics(url string) *Analytics { if len(url) == 0 {