chore(linting): code lint

This commit is contained in:
jguer 2021-12-18 22:37:50 +01:00 committed by J Guerreiro
parent d02321bdc9
commit 1c22cc491c
4 changed files with 5 additions and 5 deletions

2
cmd.go
View file

@ -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
}

View file

@ -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
}

View file

@ -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
}

View file

@ -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 {