Skip to content

Commit

Permalink
Fix golangci-lint issues in mesheryctl.
Browse files Browse the repository at this point in the history
Signed-off-by: Huang Xin <[email protected]>
  • Loading branch information
gyohuangxin committed Feb 6, 2024
1 parent 7607ac4 commit 3c8cb11
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 4 additions & 1 deletion mesheryctl/internal/cli/root/registry/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,10 @@ func init() {
// publishCmd.Flags().StringVarP(&imgsOutputPath, "imgs-output-path", "p", "", "images output path")

publishCmd.Flags().StringVarP(&outputFormat, "output-format", "o", "", "output format [md | mdx | js]")
publishCmd.MarkFlagRequired("output-format")
err := publishCmd.MarkFlagRequired("output-format")
if err != nil {
utils.Log.Error(err)
}

// publishCmd.MarkFlagRequired("system")
// publishCmd.MarkFlagRequired("google-sheet-credential")
Expand Down
5 changes: 2 additions & 3 deletions mesheryctl/pkg/utils/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,11 @@ func (mch *ComponentCSVHelper) ParseComponentsSheet() error {
return ErrFileRead(err)
}

go func() error {
go func(){
err := csvReader.Parse(ch, errorChan)
if err != nil {
return ErrFileRead(err)
errorChan <- err
}
return nil
}()

for {
Expand Down
5 changes: 2 additions & 3 deletions mesheryctl/pkg/utils/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,11 @@ func (mch *ModelCSVHelper) ParseModelsSheet() error {
return ErrFileRead(err)
}

go func() error {
go func(){
err := csvReader.Parse(ch, errorChan)
if err != nil {
return ErrFileRead(err)
errorChan <- err
}
return nil
}()
for {
select {
Expand Down

0 comments on commit 3c8cb11

Please sign in to comment.