Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 3.2.3 #88

Merged
merged 14 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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'

################################################################################
14 changes: 8 additions & 6 deletions cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"os/exec"
"path/filepath"
"runtime"
"slices"
"sort"
"strconv"
"strings"
Expand All @@ -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"
Expand All @@ -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"
)

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
}
}
Expand Down Expand Up @@ -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
}
}
}
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Loading