Skip to content

Commit dc77462

Browse files
committed
fix golint
1 parent c9b4e52 commit dc77462

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

component/model.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ func (c *modelComponentImpl) SetRuntimeFrameworkModes(ctx context.Context, curre
10731073
if err != nil {
10741074
return nil, err
10751075
}
1076-
if relations == nil || len(relations) < 1 {
1076+
if len(relations) < 1 {
10771077
err = c.repoRuntimeFrameworkStore.Add(ctx, id, model.Repository.ID, deployType)
10781078
if err != nil {
10791079
failedModels = append(failedModels, model.Repository.Path)
@@ -1135,7 +1135,7 @@ func (c *modelComponentImpl) ListModelsOfRuntimeFrameworks(ctx context.Context,
11351135
return nil, 0, fmt.Errorf("failed to get repo by deploy type, error:%w", err)
11361136
}
11371137

1138-
if runtimeRepos == nil || len(runtimeRepos) < 1 {
1138+
if len(runtimeRepos) < 1 {
11391139
return nil, 0, nil
11401140
}
11411141

dataviewer/workflows/activity.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ func (dva *dataViewerActivityImpl) DetermineCardData(ctx context.Context, determ
258258
} else if determineParam.RepoDataType == RepoCsvData {
259259
scopeFiles = determineParam.Class.CsvFiles
260260
}
261-
if scopeFiles == nil || len(scopeFiles) < 1 {
261+
if len(scopeFiles) < 1 {
262262
slog.Warn("no valid target files found", slog.Any("card", determineParam.Card))
263263
return nil, nil
264264
}

0 commit comments

Comments
 (0)