mirror of
https://github.com/Jguer/yay
synced 2024-07-21 10:16:10 +00:00
chore(linting): code lint
This commit is contained in:
parent
d02321bdc9
commit
1c22cc491c
2
cmd.go
2
cmd.go
|
@ -404,7 +404,7 @@ func syncList(ctx context.Context, httpClient *http.Client, cmdArgs *parser.Argu
|
|||
}
|
||||
|
||||
if config.Runtime.Mode.AtLeastAUR() && (len(cmdArgs.Targets) == 0 || aur) {
|
||||
req, err := http.NewRequestWithContext(ctx, "GET", config.AURURL+"/packages.gz", nil)
|
||||
req, err := http.NewRequestWithContext(ctx, "GET", config.AURURL+"/packages.gz", http.NoBody)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ func createAURList(ctx context.Context, client *http.Client, aurURL string, out
|
|||
|
||||
u.Path = path.Join(u.Path, "packages.gz")
|
||||
|
||||
req, err := http.NewRequestWithContext(ctx, "GET", u.String(), nil)
|
||||
req, err := http.NewRequestWithContext(ctx, "GET", u.String(), http.NoBody)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ type rss struct {
|
|||
}
|
||||
|
||||
func PrintNewsFeed(ctx context.Context, client *http.Client, cutOffDate time.Time, bottomUp, all, quiet bool) error {
|
||||
req, err := http.NewRequestWithContext(ctx, "GET", "https://archlinux.org/feeds/news", nil)
|
||||
req, err := http.NewRequestWithContext(ctx, "GET", "https://archlinux.org/feeds/news", http.NoBody)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -58,8 +58,8 @@ func ContinueTask(s string, cont, noConfirm bool) bool {
|
|||
postFix string
|
||||
yes = gotext.Get("yes")
|
||||
no = gotext.Get("no")
|
||||
y = string([]rune(yes)[0])
|
||||
n = string([]rune(no)[0])
|
||||
y = string([]rune(yes)[0]) // nolint
|
||||
n = string([]rune(no)[0]) // nolint
|
||||
)
|
||||
|
||||
if cont {
|
||||
|
|
Loading…
Reference in a new issue