Commit Graph

13 Commits

Author SHA1 Message Date
Eng Zer Jun
a1121556be
refactor: remove redundant len check (#2291)
`len` returns 0 if the slice or map is nil. From the Go specification
[1]:

  "1. For a nil slice, the number of iterations is 0."
  "3. If the map is nil, the number of iterations is 0."

Therefore, an additional `len(v) != 0` check for before the loop is
unnecessary.

[1]: https://go.dev/ref/spec#For_range

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-09-27 12:36:08 +02:00
Jo
8916cd174b
refactor(yay): move cfg inside of runtime (#2259)
* rework relationship between runtime and cfg

* separate runtime from cfg

* simplify instantiation logic

* move installer to appropriate package

* move operator to sync package

* add tests for srcinfo service

* consolidate srcinfo service in sync

* add logger to srcinfo

* add logger to preparer

* remove unused text functions

* remove remaining text.* from srcinfo

* remove global logger parts

* remove global org method exports

* remove global logger

* move text->input

* add rule to prevent fmt.Print

* update golangci go version

* remove outdated FAQs

* remove outdated FAQs
2023-08-06 21:39:41 +02:00
Jo
7bc4a666e6
refactor(runtime): Build runtime after cmdargs parsing (#1965)
* extract runtime building from cfg

* respect AURRPCURL

* use -Syu if there are no targets, allows to pass extra options

* one more step towards removing runtime from cfg
2023-03-13 08:48:39 +00:00
Jo
3d5a43c294
chore(yay): bump version (#1949)
bump major
2023-03-07 21:04:06 +00:00
Jo
fad26c078d
fix(getpkgbuild): check AUR pkgs exist before GetPKGBUILD (#1921)
check AUR pkgs exist before GetPKGBUILD
2023-02-20 23:58:13 +00:00
Jo
b8debd1ae7
chore(yay): fix small linting issues (#1885)
* replace context.TODO() in tests context.Background()

* remove mock TODOs

* prettier

* apply missing linting
2023-01-03 21:43:56 +00:00
jguer
555d1ead95
chore(version): bump major version 2021-09-08 22:28:08 +02:00
jguer
e231b2b02d chore(yay): modernize exec commands 2021-08-14 00:10:43 +02:00
jguer
cb4b57f6d8 chore(golangci): add new linters 2021-08-11 22:19:55 +02:00
jguer
08d1305ec5 feat(download): respect aur url settings and update deps 2021-08-11 22:19:55 +02:00
jguer
5c11c01d85 refactor(exe): move sudo loop into CmdBuilder 2021-08-08 21:02:35 +02:00
jguer
b8641256ab chore(download): rename PKGBUILD function to match package 2021-08-05 10:11:54 +02:00
jguer
65b1c4be69 refactor(main): move get cmds to their own file 2021-08-05 10:11:54 +02:00