util: fix golint warnings in csiconfig, volid

golint warns about the following statements:

ceph-csi/internal/util/csiconfig.go
Line 49: warning: exported function Mons should have comment or be unexported (golint)

ceph-csi/pkg/util/volid.go :
Line 72: warning: exported method CSIIdentifier.ComposeCSIID should have comment
or be unexported (golint)

Reported-by: https://goreportcard.com/report/github.com/ceph/ceph-csi
Updates: #975

Signed-off-by: Yug Gupta <ygupta@redhat.com>
This commit is contained in:
Yug Gupta
2020-04-28 20:52:24 +05:30
committed by mergify[bot]
parent b6ea4ecdf0
commit 47226ccdf7
2 changed files with 13 additions and 12 deletions

View File

@ -23,6 +23,14 @@ import (
"strings"
)
// clusterInfo strongly typed JSON spec for the below JSON structure
type clusterInfo struct {
// ClusterID is used for unique identification
ClusterID string `json:"clusterID"`
// Monitors is monitor list for corresponding cluster ID
Monitors []string `json:"monitors"`
}
/*
Mons returns a comma separated MON list from the csi config for the given clusterID
Expected JSON structure in the passed in config file is,
@ -39,13 +47,6 @@ Expected JSON structure in the passed in config file is,
...
]
*/
// clusterInfo strongly typed JSON spec for the above JSON structure
type clusterInfo struct {
ClusterID string `json:"clusterID"`
Monitors []string `json:"monitors"`
}
func Mons(pathToConfig, clusterID string) (string, error) {
var config []clusterInfo