From 466214c4b51eb806a640a5844a4bb1bf2c72e213 Mon Sep 17 00:00:00 2001 From: RamiBerm Date: Sun, 11 Jul 2021 14:35:15 +0300 Subject: [PATCH] Update fetch.go and fetchRunner.go --- cli/cmd/fetch.go | 4 ++-- cli/cmd/fetchRunner.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/cmd/fetch.go b/cli/cmd/fetch.go index 9e55f08fa..7faeffdc1 100644 --- a/cli/cmd/fetch.go +++ b/cli/cmd/fetch.go @@ -8,7 +8,7 @@ type MizuFetchOptions struct { FromTimestamp int64 ToTimestamp int64 Directory string - MizuPort uint + MizuPort uint16 } var mizuFetchOptions = MizuFetchOptions{} @@ -28,5 +28,5 @@ func init() { fetchCmd.Flags().StringVarP(&mizuFetchOptions.Directory, "directory", "d", ".", "Provide a custom directory for fetched entries") fetchCmd.Flags().Int64Var(&mizuFetchOptions.FromTimestamp, "from", 0, "Custom start timestamp for fetched entries") fetchCmd.Flags().Int64Var(&mizuFetchOptions.ToTimestamp, "to", 0, "Custom end timestamp fetched entries") - fetchCmd.Flags().UintVarP(&mizuFetchOptions.MizuPort, "port", "p", 8899, "Custom port for mizu") + fetchCmd.Flags().Uint16VarP(&mizuFetchOptions.MizuPort, "port", "p", 8899, "Custom port for mizu") } diff --git a/cli/cmd/fetchRunner.go b/cli/cmd/fetchRunner.go index e44017fd0..f06e3b367 100644 --- a/cli/cmd/fetchRunner.go +++ b/cli/cmd/fetchRunner.go @@ -16,7 +16,7 @@ import ( ) func RunMizuFetch(fetch *MizuFetchOptions) { - mizuProxiedUrl := kubernetes.GetMizuCollectorProxiedHostAndPath(uint16(fetch.MizuPort), mizu.ResourcesNamespace, mizu.AggregatorPodName) + mizuProxiedUrl := kubernetes.GetMizuCollectorProxiedHostAndPath(fetch.MizuPort, mizu.ResourcesNamespace, mizu.AggregatorPodName) resp, err := http.Get(fmt.Sprintf("http://%s/api/har?from=%v&to=%v", mizuProxiedUrl, fetch.FromTimestamp, fetch.ToTimestamp)) if err != nil { log.Fatal(err)