Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Lei Da authored and Rader committed Nov 21, 2024
1 parent 6a9520d commit 8d2e317
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 0 additions & 2 deletions builder/store/database/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ const (
PromptTagScope TagScope = "prompt"
)

const defaultTagGroup = ""

type Tag struct {
ID int64 `bun:",pk,autoincrement" json:"id"`
Name string `bun:",notnull" json:"name" yaml:"name"`
Expand Down
7 changes: 4 additions & 3 deletions builder/store/database/tag_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,12 @@ func TestTagStore_SetMetaTags(t *testing.T) {
BuiltIn: true,
ShowName: "",
})
repoTags, err := ts.SetMetaTags(ctx, types.ModelRepo, userName, repoName, tags)
_, err = ts.SetMetaTags(ctx, types.ModelRepo, userName, repoName, tags)
// should report err as framework tag is not allowed
require.NotEmpty(t, err)

tags = tags[:1]
repoTags, err = ts.SetMetaTags(ctx, types.ModelRepo, userName, repoName, tags)
repoTags, err := ts.SetMetaTags(ctx, types.ModelRepo, userName, repoName, tags)
require.Empty(t, err)
require.Len(t, repoTags, 1)
}
Expand Down Expand Up @@ -528,7 +528,8 @@ func TestTagStore_RemoveRepoTags(t *testing.T) {
require.Empty(t, err)
require.NotNil(t, repo)
// set repo tags
ts.UpsertRepoTags(ctx, repo.ID, []int64{}, []int64{tag1.ID, tag2.ID})
err = ts.UpsertRepoTags(ctx, repo.ID, []int64{}, []int64{tag1.ID, tag2.ID})
require.Empty(t, err)

removeTagIds := make([]int64, 0, 1)
removeTagIds = append(removeTagIds, tag2.ID)
Expand Down

0 comments on commit 8d2e317

Please sign in to comment.