Skip to content

Commit

Permalink
chore: improve code quality (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
CorrectRoadH authored Mar 20, 2024
1 parent 7b060cd commit 4084046
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
3 changes: 0 additions & 3 deletions service/appstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ func (s *appStore) CategoryMap() (map[string]codegen.CategoryInfo, error) {
}

categoryMap := LoadCategoryMap(storeRoot)
if err != nil {
return nil, err
}

s.categoryMap = categoryMap

Expand Down
2 changes: 1 addition & 1 deletion service/appstore_management.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (a *AppStoreManagement) DeleteGlobal(key string) error {
func (a *AppStoreManagement) RegisterAppStore(ctx context.Context, appstoreURL string, callbacks ...func(*codegen.AppStoreMetadata)) error {
// check if appstore already exists
for _, url := range config.ServerInfo.AppStoreList {
if strings.ToLower(url) == strings.ToLower(appstoreURL) {
if strings.EqualFold(url, appstoreURL) {
return nil
}
}
Expand Down
5 changes: 2 additions & 3 deletions service/compose_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,10 @@ func (a *ComposeApp) AuthorType() codegen.StoreAppAuthorType {
return codegen.Unknown
}

if strings.ToLower(storeInfo.Author) == strings.ToLower(storeInfo.Developer) {
if strings.EqualFold(storeInfo.Author, storeInfo.Developer) {
return codegen.Official
}

if strings.ToLower(storeInfo.Author) == strings.ToLower(common.ComposeAppAuthorCasaOSTeam) {
if strings.EqualFold(storeInfo.Author, common.ComposeAppAuthorCasaOSTeam) {
return codegen.ByCasaos
}

Expand Down

0 comments on commit 4084046

Please sign in to comment.