mirror of
https://github.com/Jguer/yay
synced 2024-07-24 03:34:12 +00:00
Minor cleanups to keep the linter happy
* Unexported: - QuestionCallback - SliceToStringSet * Unreachable return in parser.go * Unneded else in dependencies.go * Punctuation in error message in install.go
This commit is contained in:
parent
a5b5cc38ee
commit
9f62663888
|
@ -4,7 +4,7 @@ import (
|
|||
alpm "github.com/jguer/go-alpm"
|
||||
)
|
||||
|
||||
func QuestionCallback(question alpm.QuestionAny) {
|
||||
func questionCallback(question alpm.QuestionAny) {
|
||||
q, err := question.QuestionInstallIgnorepkg()
|
||||
if err == nil {
|
||||
q.SetInstall(true)
|
||||
|
|
2
cmd.go
2
cmd.go
|
@ -224,7 +224,7 @@ func initAlpm() (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
alpmHandle.SetQuestionCallback(QuestionCallback)
|
||||
alpmHandle.SetQuestionCallback(questionCallback)
|
||||
|
||||
return
|
||||
}
|
||||
|
|
|
@ -63,9 +63,8 @@ func splitDbFromName(pkg string) (string, string) {
|
|||
|
||||
if len(split) == 2 {
|
||||
return split[0], split[1]
|
||||
} else {
|
||||
return "", split[0]
|
||||
}
|
||||
return "", split[0]
|
||||
}
|
||||
|
||||
// Step two of dependency resolving. We already have all the information on the
|
||||
|
|
|
@ -145,7 +145,7 @@ func install(parser *arguments) error {
|
|||
if !parser.existsArg("gendb") && len(arguments.targets) > 0 {
|
||||
err := passToPacman(arguments)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error installing repo packages.")
|
||||
return fmt.Errorf("Error installing repo packages")
|
||||
}
|
||||
|
||||
depArguments := makeArguments()
|
||||
|
|
|
@ -39,7 +39,7 @@ func (set stringSet) toSlice() []string {
|
|||
return slice
|
||||
}
|
||||
|
||||
func SliceToStringSet(in []string) stringSet {
|
||||
func sliceToStringSet(in []string) stringSet {
|
||||
set := make(stringSet)
|
||||
|
||||
for _, v := range in {
|
||||
|
@ -50,7 +50,7 @@ func SliceToStringSet(in []string) stringSet {
|
|||
}
|
||||
|
||||
func makeStringSet(in ...string) stringSet {
|
||||
return SliceToStringSet(in)
|
||||
return sliceToStringSet(in)
|
||||
}
|
||||
|
||||
// Parses command line arguments in a way we can interact with programmatically but
|
||||
|
@ -519,8 +519,6 @@ func (parser *arguments) parseStdin() (err error) {
|
|||
|
||||
parser.addTarget(target)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (parser *arguments) parseCommandLine() (err error) {
|
||||
|
|
Loading…
Reference in a new issue