1
0
mirror of https://github.com/go-task/task.git synced 2025-11-25 22:32:55 +02:00

Update minimum go version (#1758)

* feat: update minimum version to 1.22

* refactor: use int range iterator

* refactor: loop variables

* refactor: replace slicesext.FirstNonZero with cmp.Or

* refactor: use slices.Concat instead of append

* fix: unused param

* fix: linting
This commit is contained in:
Pete Davison
2024-08-14 14:37:05 +01:00
committed by GitHub
parent 51c569ef37
commit 5e9851f42f
18 changed files with 50 additions and 60 deletions

View File

@@ -89,7 +89,7 @@ func envColor(env string, defaultColor color.Attribute) []color.Attribute {
// Otherwise, split by semicolons (ANSI color codes) and use them as is.
attributeStrs := strings.Split(override, ",")
if len(attributeStrs) == 3 {
attributeStrs = append([]string{"38", "2"}, attributeStrs...)
attributeStrs = slices.Concat([]string{"38", "2"}, attributeStrs)
} else {
attributeStrs = strings.Split(override, ";")
}