Skip to content

Commit

Permalink
pr: fmt go files according golangci-lint err
Browse files Browse the repository at this point in the history
Signed-off-by: Qi Feng Huo <[email protected]>
  • Loading branch information
Qi Feng Huo committed Sep 28, 2023
1 parent 982507a commit d7f2d01
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 10 deletions.
8 changes: 4 additions & 4 deletions pkg/zhmcclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ import (
)

func NewZapLogger() Logger {
zapLogger, _ := zap.NewProduction()
return zapLogger
zapLogger, _ := zap.NewProduction()
return zapLogger
}

var logger = NewZapLogger()
Expand Down Expand Up @@ -107,8 +107,8 @@ type Client struct {
func NewClient(endpoint string, opts *Options, l Logger) (ClientAPI, *HmcError) {

if l != nil {
logger = l
}
logger = l
}

tslConfig, err := SetCertificate(opts, &tls.Config{})
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions pkg/zhmcclient/cpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
)

// CpcAPI defines an interface for issuing CPC requests to ZHMC
//
//go:generate counterfeiter -o fakes/cpc.go --fake-name CpcAPI . CpcAPI
type CpcAPI interface {
ListCPCs(query map[string]string) ([]CPC, int, *HmcError)
Expand Down
1 change: 1 addition & 0 deletions pkg/zhmcclient/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
)

// JobAPI defines an interface for issuing Job requests to ZHMC
//
//go:generate counterfeiter -o fakes/job.go --fake-name JobAPI . JobAPI
type JobAPI interface {
QueryJob(jobURI string) (*Job, int, *HmcError)
Expand Down
1 change: 0 additions & 1 deletion pkg/zhmcclient/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"go.uber.org/zap/zapcore"
)


type Logger interface {
Debug(msg string, fields ...zapcore.Field)
Info(msg string, fields ...zapcore.Field)
Expand Down
1 change: 1 addition & 0 deletions pkg/zhmcclient/lpar.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
)

// LparAPI defines an interface for issuing LPAR requests to ZHMC
//
//go:generate counterfeiter -o fakes/lpar.go --fake-name LparAPI . LparAPI
type LparAPI interface {
CreateLPAR(cpcURI string, props *LparProperties) (string, int, *HmcError)
Expand Down
1 change: 1 addition & 0 deletions pkg/zhmcclient/nic.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
)

// NicAPI defines an interface for issuing NIC requests to ZHMC
//
//go:generate counterfeiter -o fakes/nic.go --fake-name NicAPI . NicAPI
type NicAPI interface {
CreateNic(lparURI string, nic *NIC) (string, int, *HmcError)
Expand Down
11 changes: 6 additions & 5 deletions pkg/zhmcclient/sgroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,12 @@ func (m *StorageGroupManager) UpdateStorageGroupProperties(storageGroupURI strin
return status, nil
}

/**
* POST /api/storage-groups/{storage-group-id}/operations/accept-mismatched-
storage-volumes
* Return: 200
* or: 400, 404, 409
/*
*
- POST /api/storage-groups/{storage-group-id}/operations/accept-mismatched-
storage-volumes
- Return: 200
- or: 400, 404, 409
*/
func (m *StorageGroupManager) FulfillStorageGroup(storageGroupURI string, request *StorageGroupProperties) (int, *HmcError) {
requestUrl := m.client.CloneEndpointURL()
Expand Down
1 change: 1 addition & 0 deletions pkg/zhmcclient/vswitch.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
)

// VirtualSwitchAPI defines an interface for issuing VirtualSwitch requests to ZHMC
//
//go:generate counterfeiter -o fakes/vswitch.go --fake-name VirtualSwitchAPI . VirtualSwitchAPI
type VirtualSwitchAPI interface {
ListVirtualSwitches(cpcURI string, query map[string]string) ([]VirtualSwitch, int, *HmcError)
Expand Down

0 comments on commit d7f2d01

Please sign in to comment.