Skip to content

Commit

Permalink
Fix golangci-lint
Browse files Browse the repository at this point in the history
Signed-off-by: Xin Huang <xin1.huang@intel.com>
  • Loading branch information
gyohuangxin committed Feb 29, 2024
1 parent 447a529 commit 6f578ca
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions models/controllers/meshery_broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ func (mb *mesheryBroker) GetStatus() MesheryControllerStatus {
// TODO: Confirm if the presence of operator is needed to use the operator client sdk
_, err = operatorClient.CoreV1Alpha1().Brokers("meshery").Get(context.TODO(), "meshery-broker", metav1.GetOptions{})
if err == nil {
monitoringEndpoint, err := mb.GetEndpointForPort(brokerMonitoringPortName)
if err == nil {
monitoringEndpoint, endpoint_err := mb.GetEndpointForPort(brokerMonitoringPortName)
if endpoint_err == nil {
if ConnectivityTest(MesheryServer, monitoringEndpoint) {
mb.status = Connected
return mb.status
Expand Down
4 changes: 2 additions & 2 deletions models/controllers/meshsync.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ func (ms *meshsync) GetStatus() MesheryControllerStatus {
case v1.PodRunning:
ms.status = Running
broker := NewMesheryBrokerHandler(ms.kclient)
brokerEndpoint, err := broker.GetEndpointForPort(brokerMonitoringPortName)
if err != nil {
brokerEndpoint, endpoint_err := broker.GetEndpointForPort(brokerMonitoringPortName)
if endpoint_err != nil {
return ms.status
}
isConnected := ConnectivityTest(MeshSync, brokerEndpoint)
Expand Down
2 changes: 1 addition & 1 deletion models/model/core/v1alpha1/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type ComponentDefinition struct {
UpdatedAt time.Time `json:"-"`
}
type ComponentDefinitionDB struct {
ID uuid.UUID `json:"id"`
ID uuid.UUID `json:"componentDefinitionId"`
ModelID uuid.UUID `json:"-" gorm:"index:idx_component_definition_dbs_model_id,column:modelID"`
TypeMeta
DisplayName string `json:"displayName" gorm:"displayName"`
Expand Down
2 changes: 1 addition & 1 deletion models/model/core/v1alpha1/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ type Model struct {
}

type ModelDB struct {
ID uuid.UUID `json:"id"`
ID uuid.UUID `json:"modelDBId"`
CategoryID uuid.UUID `json:"-" gorm:"categoryID"`
Name string `json:"modelName" gorm:"modelName"`
Version string `json:"version"`
Expand Down

0 comments on commit 6f578ca

Please sign in to comment.