Skip to content

Commit

Permalink
Refactor func name
Browse files Browse the repository at this point in the history
  • Loading branch information
babarot committed Jan 14, 2025
1 parent 9883505 commit 0afb186
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/config/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ func (l *Link) UnmarshalYAML(b []byte) error {
return nil
}

// GetLink is
func (c Command) GetLink(pkg Package) ([]Link, error) {
var links []Link

Expand Down Expand Up @@ -92,6 +91,7 @@ func (c Command) GetLink(pkg Package) ([]Link, error) {
continue
}
file := filepath.Join(pkg.GetHome(), link.From)
// zglob can search file path even if file path doesn't includ asterisk at all.
matches, err := zglob.Glob(file)
if err != nil {
return links, errors.Wrapf(err, "%s: failed to get links", pkg.GetName())
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/gist.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (c Gist) Installed() bool {
list = append(list, err == nil)
}

return check(list)
return allTrue(list)
}

// HasPluginBlock is
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func (c GitHub) Installed() bool {
list = append(list, err == nil)
}

return check(list)
return allTrue(list)
}

func (c GitHub) GetReleaseTag() string {
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func (c HTTP) Installed() bool {
list = append(list, err == nil)
}

return check(list)
return allTrue(list)
}

// HasPluginBlock is
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func isExecutable(path string) error {
return nil
}

func check(list []bool) bool {
func allTrue(list []bool) bool {
if len(list) == 0 {
return false
}
Expand Down

0 comments on commit 0afb186

Please sign in to comment.