From 7ab6e3f5e3070a3fb70baf78d80d011c51b59c36 Mon Sep 17 00:00:00 2001
From: Malte Bauch <malte.bauch@stud.h-da.de>
Date: Fri, 26 Mar 2021 11:31:03 +0100
Subject: [PATCH] renamed cli/http.go HttpGet function to HTTPGet

---
 cli/cli_test.go   | 4 ++--
 cli/http.go       | 2 +-
 cmd/addDevice.go  | 2 +-
 cmd/cli.go        | 2 +-
 cmd/cliSet.go     | 2 +-
 cmd/getDevice.go  | 2 +-
 cmd/getIds.go     | 2 +-
 cmd/init.go       | 2 +-
 cmd/request.go    | 2 +-
 cmd/requestAll.go | 2 +-
 10 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/cli/cli_test.go b/cli/cli_test.go
index df6c6ec4d..65bf6e649 100644
--- a/cli/cli_test.go
+++ b/cli/cli_test.go
@@ -69,8 +69,8 @@ func TestHttpGet(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
-			if err := HttpGet(tt.args.apiEndpoint, tt.args.f, tt.args.args...); (err != nil) != tt.wantErr {
-				t.Errorf("HttpGet() error = %v, wantErr %v", err, tt.wantErr)
+			if err := HTTPGet(tt.args.apiEndpoint, tt.args.f, tt.args.args...); (err != nil) != tt.wantErr {
+				t.Errorf("HTTPGet() error = %v, wantErr %v", err, tt.wantErr)
 			}
 		})
 	}
diff --git a/cli/http.go b/cli/http.go
index 5c1e9e2e2..ba3b2f676 100644
--- a/cli/http.go
+++ b/cli/http.go
@@ -17,7 +17,7 @@ func init() {
 	builder = &strings.Builder{}
 }
 
-func HttpGet(apiEndpoint, f string, args ...string) error {
+func HTTPGet(apiEndpoint, f string, args ...string) error {
 	for _, p := range args {
 		builder.WriteString("&")
 		builder.WriteString(p)
diff --git a/cmd/addDevice.go b/cmd/addDevice.go
index 66b68e55b..3b98c03b9 100644
--- a/cmd/addDevice.go
+++ b/cmd/addDevice.go
@@ -42,7 +42,7 @@ var addDeviceCmd = &cobra.Command{
 	Short: "adds a device to the controller",
 	Long:  ``,
 	RunE: func(cmd *cobra.Command, args []string) error {
-		return cli.HttpGet(
+		return cli.HTTPGet(
 			apiEndpoint,
 			"addDevice",
 			"address="+address,
diff --git a/cmd/cli.go b/cmd/cli.go
index 36ea21d80..1719e46de 100644
--- a/cmd/cli.go
+++ b/cmd/cli.go
@@ -45,7 +45,7 @@ var cliCmd = &cobra.Command{
 	Short: "",
 	Long:  ``,
 	RunE: func(cmd *cobra.Command, args []string) error {
-		return cli.HttpGet(apiEndpoint, "init")
+		return cli.HTTPGet(apiEndpoint, "init")
 	},
 }
 
diff --git a/cmd/cliSet.go b/cmd/cliSet.go
index b16b4b8f5..525125472 100644
--- a/cmd/cliSet.go
+++ b/cmd/cliSet.go
@@ -42,7 +42,7 @@ var cliSetCmd = &cobra.Command{
 	Short: "set a value on a device",
 	Long:  ``,
 	RunE: func(cmd *cobra.Command, args []string) error {
-		return cli.HttpGet(
+		return cli.HTTPGet(
 			apiEndpoint,
 			"set",
 			"uuid="+uuid,
diff --git a/cmd/getDevice.go b/cmd/getDevice.go
index fb3bf1aed..b9d3408c1 100644
--- a/cmd/getDevice.go
+++ b/cmd/getDevice.go
@@ -42,7 +42,7 @@ var getDeviceCmd = &cobra.Command{
 	Short: "gets device information from the controller",
 	Long:  ``,
 	RunE: func(cmd *cobra.Command, args []string) error {
-		return cli.HttpGet(
+		return cli.HTTPGet(
 			apiEndpoint,
 			"getDevice",
 			"uuid="+uuid,
diff --git a/cmd/getIds.go b/cmd/getIds.go
index c729f84b7..b4f0685be 100644
--- a/cmd/getIds.go
+++ b/cmd/getIds.go
@@ -42,7 +42,7 @@ var getIdsCmd = &cobra.Command{
 	Short: "gets device IDs from the controller",
 	Long:  ``,
 	RunE: func(cmd *cobra.Command, args []string) error {
-		return cli.HttpGet(apiEndpoint, "getIDs")
+		return cli.HTTPGet(apiEndpoint, "getIDs")
 	},
 }
 
diff --git a/cmd/init.go b/cmd/init.go
index 4cedc0edd..9a140f3c2 100644
--- a/cmd/init.go
+++ b/cmd/init.go
@@ -42,7 +42,7 @@ var initCmd = &cobra.Command{
 	Short: "initialise SBI and PND",
 	Long:  ``,
 	RunE: func(cmd *cobra.Command, args []string) error {
-		return cli.HttpGet(apiEndpoint, "init")
+		return cli.HTTPGet(apiEndpoint, "init")
 	},
 }
 
diff --git a/cmd/request.go b/cmd/request.go
index 22c873386..7e887b790 100644
--- a/cmd/request.go
+++ b/cmd/request.go
@@ -42,7 +42,7 @@ var requestCmd = &cobra.Command{
 	Short: "requests a path from a specified device on the controller",
 	Long:  ``,
 	RunE: func(cmd *cobra.Command, args []string) error {
-		return cli.HttpGet(
+		return cli.HTTPGet(
 			apiEndpoint,
 			"request",
 			"uuid="+uuid,
diff --git a/cmd/requestAll.go b/cmd/requestAll.go
index 6bd906072..183d89d4a 100644
--- a/cmd/requestAll.go
+++ b/cmd/requestAll.go
@@ -42,7 +42,7 @@ var requestAllCmd = &cobra.Command{
 	Short: "requests specified path from all devices on the controller",
 	Long:  ``,
 	RunE: func(cmd *cobra.Command, args []string) error {
-		return cli.HttpGet(
+		return cli.HTTPGet(
 			apiEndpoint,
 			"requestAll",
 			"sbi="+cliSbi,
-- 
GitLab