Align format through `go fmt` 80/11680/1
authorTaewan Kim <t25.kim@samsung.com>
Wed, 23 Aug 2023 08:43:58 +0000 (17:43 +0900)
committerTaewan Kim <t25.kim@samsung.com>
Tue, 29 Aug 2023 00:42:08 +0000 (09:42 +0900)
Issue-ID: AIMLFW-55

Change-Id: I9e646fe178613c1231350cef06c7cbfcb5b03eb3
Signed-off-by: Taewan Kim <t25.kim@samsung.com>
Makefile
cmd/kserve-adapter/main.go
pkg/client/kserve/utils.go
pkg/commons/types/values.go
pkg/helm/config.go
pkg/helm/schema.go

index 5f18f89..8557c94 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -28,3 +28,6 @@ run:
        ./kserve-adapter
 genmock:
        go generate ./...
+fmt:
+       go fmt ./cmd/...
+       go fmt ./pkg/...
index 689c324..4e7ad9a 100644 (file)
@@ -23,9 +23,9 @@ import (
        "flag"
        "os"
 
-       "github.com/spf13/viper"
        "gerrit.o-ran-sc.org/r/aiml-fw/aihp/ips/kserve-adapter/pkg/api"
        "gerrit.o-ran-sc.org/r/aiml-fw/aihp/ips/kserve-adapter/pkg/commons/logger"
+       "github.com/spf13/viper"
 )
 
 const KSERVE_ADAPTER_CONFIG_FILE = "./config/kserve-adapter.yaml"
index 0462be4..f4e8115 100644 (file)
@@ -57,7 +57,7 @@ func convertValuesToInferenceService(values types.Values) (ifsv api_v1beta1.Infe
                        Name:      values.FullName,
                        Namespace: ips_namespace,
                        Labels: map[string]string{
-                               "app":                     values.FullName,
+                               "app": values.FullName,
                        },
                },
                Spec: api_v1beta1.InferenceServiceSpec{
@@ -78,7 +78,7 @@ func convertValuesToInferenceService(values types.Values) (ifsv api_v1beta1.Infe
        case "tensorflow":
                ifsv.Spec.Predictor.Tensorflow = &api_v1beta1.TFServingSpec{
                        PredictorExtensionSpec: api_v1beta1.PredictorExtensionSpec{
-                               StorageURI: &values.StorageURI,
+                               StorageURI:     &values.StorageURI,
                                RuntimeVersion: &values.RuntimeVersion,
                                Container: core_v1.Container{
                                        Image: values.Image,
index 1caa1a1..c43381d 100644 (file)
@@ -30,7 +30,7 @@ type Values struct {
        Resources             string `yaml:"resources"`
        RICServiceAccountName string `yaml:"ric_serviceaccount_name"`
        StorageURI            string `yaml:"storageUri"`
-       RuntimeVersion        string `yaml:"runtimeVersion"`
+       RuntimeVersion        string `yaml:"runtimeVersion"`
        Image                 string `yaml:"image"`
        ResourceVersion       string
        CanaryTrafficPercent  int64
index 9dbe5a4..8ccdb6b 100644 (file)
@@ -25,14 +25,14 @@ type Config struct {
        Version          string           `json:"version"`
        SaName           string           `json:"sa_name"`
        InferenceService InferenceService `json:"inferenceservice"`
-       configFile string
+       configFile       string
 }
 
 type InferenceService struct {
-       Engine          string `json:"engine"`
-       StorageURI      string `json:"storage_uri"`
-       RuntimeVersion  string `json:"runtime_version"`
-       ApiVersion      string `json:"api_version"`
-       MinReplicas     int32  `json:"min_replicas"`
-       MaxReplicas     int32  `json:"max_replicas"`
+       Engine         string `json:"engine"`
+       StorageURI     string `json:"storage_uri"`
+       RuntimeVersion string `json:"runtime_version"`
+       ApiVersion     string `json:"api_version"`
+       MinReplicas    int32  `json:"min_replicas"`
+       MaxReplicas    int32  `json:"max_replicas"`
 }
index 7f7a771..b111de5 100644 (file)
@@ -27,7 +27,7 @@ type Schema struct {
        Title       string      `json:"title"`
        Required    []string    `json:"required"`
        Properties  Properties  `json:"properties"`
-       schemaFile string
+       schemaFile  string
 }
 
 type Definitions struct {
@@ -46,12 +46,12 @@ type InferenceServiceSchema struct {
 }
 
 type InferenceServiceProperty struct {
-       Engine          StringProperty  `json:"engine"`
-       StorageURI      StringProperty  `json:"storage_uri"`
-       RuntimeVersion  StringProperty  `json:"runtime_version"`
-       ApiVersion      StringProperty  `json:"api_version"`
-       MinReplicas     IntegerProperty `json:"min_replicas"`
-       MaxReplicas     IntegerProperty `json:"max_replicas"`
+       Engine         StringProperty  `json:"engine"`
+       StorageURI     StringProperty  `json:"storage_uri"`
+       RuntimeVersion StringProperty  `json:"runtime_version"`
+       ApiVersion     StringProperty  `json:"api_version"`
+       MinReplicas    IntegerProperty `json:"min_replicas"`
+       MaxReplicas    IntegerProperty `json:"max_replicas"`
 }
 
 type StringProperty struct {