diff --git a/Makefile b/Makefile index dbfe10e..fac20b7 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ ################################################################################ -# This Makefile generated by GoMakeGen 3.2.2 using next command: +# This Makefile generated by GoMakeGen 3.2.3 using next command: # gomakegen --mod --strip . # # More info: https://kaos.sh/gomakegen @@ -122,6 +122,6 @@ help: ## Show this info | sort -h \ | awk 'BEGIN {FS = " .*?## "}; {printf " \033[32m%-11s\033[0m %s\n", $$1, $$2}' @echo -e '' - @echo -e '\033[90mGenerated by GoMakeGen 3.2.2\033[0m\n' + @echo -e '\033[90mGenerated by GoMakeGen 3.2.3\033[0m\n' ################################################################################ diff --git a/cli/cli.go b/cli/cli.go index 97328f2..e486715 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -14,6 +14,7 @@ import ( "os/exec" "path/filepath" "runtime" + "slices" "sort" "strconv" "strings" @@ -26,7 +27,6 @@ import ( "github.com/essentialkaos/ek/v13/mathutil" "github.com/essentialkaos/ek/v13/options" "github.com/essentialkaos/ek/v13/path" - "github.com/essentialkaos/ek/v13/sliceutil" "github.com/essentialkaos/ek/v13/strutil" "github.com/essentialkaos/ek/v13/support" "github.com/essentialkaos/ek/v13/support/apps" @@ -47,7 +47,7 @@ import ( // App info const ( APP = "GoMakeGen" - VER = "3.2.2" + VER = "3.2.3" DESC = "Utility for generating makefiles for Go applications" ) @@ -255,7 +255,7 @@ func exportMakefile(makefile *Makefile) { os.Exit(1) } - fmtc.Printf("{g}Makefile successfully created as {g*}%s{!}\n", options.GetS(OPT_OUTPUT)) + fmtc.Printfn("{g}Makefile successfully created as {g*}%s{!}", options.GetS(OPT_OUTPUT)) } // generateMakefile collects imports, process options and generate makefile struct @@ -542,7 +542,7 @@ func importMapToSlice(imports map[string]bool) []string { // containsPackage returns true if imports contains given packages func containsPackage(imports []string, pkgs []string) bool { for _, pkg := range pkgs { - if sliceutil.Contains(imports, pkg) { + if slices.Contains(imports, pkg) { return true } } @@ -599,6 +599,8 @@ func applyOptionsFromMakefile(file string, m *Makefile) { m.Benchmark = true case getOptionName(OPT_RACE): m.Race = true + case getOptionName(OPT_CGO): + m.CGO = true } } } @@ -1249,10 +1251,10 @@ func (m *Makefile) getLDFlags() string { // getActionText generates command with action description func getActionText(cur, total int, text string) string { if total > 1 { - return fmtc.Sprintf("\t@echo \"{s}[%d/%d]{!} {c*}%s{!}\"\n", cur, total, text) + return fmtc.Sprintfn("\t@echo \"{s}[%d/%d]{!} {c*}%s{!}\"", cur, total, text) } - return fmtc.Sprintf("\t@echo \"{c*}%s{!}\"\n", text) + return fmtc.Sprintfn("\t@echo \"{c*}%s{!}\"", text) } // getGoVersion returns current go version diff --git a/go.mod b/go.mod index 99e0521..8683b85 100644 --- a/go.mod +++ b/go.mod @@ -2,9 +2,9 @@ module github.com/essentialkaos/gomakegen/v3 go 1.22.8 -require github.com/essentialkaos/ek/v13 v13.10.0 +require github.com/essentialkaos/ek/v13 v13.14.1 require ( github.com/essentialkaos/depsy v1.3.1 // indirect - golang.org/x/sys v0.26.0 // indirect + golang.org/x/sys v0.27.0 // indirect ) diff --git a/go.sum b/go.sum index 8a872a2..6e3c52d 100644 --- a/go.sum +++ b/go.sum @@ -2,13 +2,13 @@ github.com/essentialkaos/check v1.4.1 h1:SuxXzrbokPGTPWxGRnzy0hXvtb44mtVrdNxgPa1 github.com/essentialkaos/check v1.4.1/go.mod h1:xQOYwFvnxfVZyt5Qvjoa1SxcRqu5VyP77pgALr3iu+M= github.com/essentialkaos/depsy v1.3.1 h1:00k9QcMsdPM4IzDaEFHsTHBD/zoM0oxtB5+dMUwbQa8= github.com/essentialkaos/depsy v1.3.1/go.mod h1:B5+7Jhv2a2RacOAxIKU2OeJp9QfZjwIpEEPI5X7auWM= -github.com/essentialkaos/ek/v13 v13.10.0 h1:uoLNjiDRJ/bOPAciq8Ff92r+XHgTm+rBI4ItOtZje9k= -github.com/essentialkaos/ek/v13 v13.10.0/go.mod h1:6G9EPJ/k4N0mugTLqPuWS/fb7K5JwoEqZSkNSfBCsgg= +github.com/essentialkaos/ek/v13 v13.14.1 h1:LAAS8OZFseAQSigrU4IAL0JeUj1G80M2WXm6B6+7ojY= +github.com/essentialkaos/ek/v13 v13.14.1/go.mod h1:GAoS44v5gtd3Yc1qqfgXsaJNoC0dMw1ueW5Fc9TTHUg= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= +golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=