mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-29 16:03:07 +03:00
Modernize all codes
go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test ./...
This commit is contained in:
@@ -51,10 +51,8 @@ func PrevIntInCycle(sl []int, current int) int {
|
||||
|
||||
func StringArraysOverlap(strArrA []string, strArrB []string) bool {
|
||||
for _, first := range strArrA {
|
||||
for _, second := range strArrB {
|
||||
if first == second {
|
||||
return true
|
||||
}
|
||||
if slices.Contains(strArrB, first) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"text/template"
|
||||
)
|
||||
|
||||
func ResolveTemplate(templateStr string, object interface{}, funcs template.FuncMap) (string, error) {
|
||||
func ResolveTemplate(templateStr string, object any, funcs template.FuncMap) (string, error) {
|
||||
tmpl, err := template.New("template").Funcs(funcs).Option("missingkey=error").Parse(templateStr)
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
||||
@@ -30,7 +30,7 @@ func SortRange(x int, y int) (int, int) {
|
||||
return y, x
|
||||
}
|
||||
|
||||
func AsJson(i interface{}) string {
|
||||
func AsJson(i any) string {
|
||||
bytes, _ := json.MarshalIndent(i, "", " ")
|
||||
return string(bytes)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user