Skip to content

Commit b0125ae

Browse files
committed
fix a small nit
1 parent 5cea177 commit b0125ae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

models/repo.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2149,15 +2149,15 @@ const (
21492149
// CustomRepoButton a config of CustomRepoButton
21502150
type CustomRepoButton struct {
21512151
Title string `yaml:"title"` // max length: 20
2152-
Typ CustomRepoButtonType `yaml:"type"`
2152+
Type CustomRepoButtonType `yaml:"type"`
21532153
Link string `yaml:"link"`
21542154
Content string `yaml:"content"`
21552155
RenderedContent string `yaml:"-"`
21562156
}
21572157

21582158
// IsLink check if it's a link button
21592159
func (b CustomRepoButton) IsLink() bool {
2160-
return b.Typ != CustomRepoButtonTypeContent
2160+
return b.Type != CustomRepoButtonTypeContent
21612161
}
21622162

21632163
// LoadCustomRepoButton by config
@@ -2193,7 +2193,7 @@ func CustomRepoButtonConfigVaild(cfg string) (bool, error) {
21932193
if len(btn.Title) > 20 {
21942194
return false, nil
21952195
}
2196-
if btn.Typ != CustomRepoButtonTypeContent && len(btn.Link) == 0 {
2196+
if btn.Type != CustomRepoButtonTypeContent && len(btn.Link) == 0 {
21972197
return false, nil
21982198
}
21992199
}

0 commit comments

Comments
 (0)