diff --git a/.githooks/pre-commit/01-docgen b/.githooks/pre-commit/01-docgen index 69087a3..2e09bd4 100755 --- a/.githooks/pre-commit/01-docgen +++ b/.githooks/pre-commit/01-docgen @@ -24,14 +24,16 @@ for f in $(find . -type f -iname "README.adoc"); do newf="${pfx}.md" set +e - asciidoctor -a ROOTDIR="${orig}/" -b docbook -o - "${f}" | pandoc -f docbook -t markdown_strict -o "${newf}" + #asciidoctor -a ROOTDIR="${orig}/" -b docbook -o - "${f}" | pandoc -f docbook -t markdown_strict -o "${newf}" + #asciidoctor -a ROOTDIR="${orig}/" -b html -o - "${f}" | pandoc -f html -t markdown_strict -o "${newf}" + asciidoctor -a ROOTDIR="${orig}/" -b html -o - "${f}" | pandoc -f html -t gfm -o "${newf}" if [ $? -eq 0 ]; then echo "Generated ${newf} from ${f}" git add "${newf}" else echo "Failed to generate ${newf} from ${f}" - git rm "${newf}" + git rm "${newf}" 2>/dev/null fi set -e fi diff --git a/chkplat.sh b/chkplat.sh new file mode 100755 index 0000000..66d8201 --- /dev/null +++ b/chkplat.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# go tool dist list for all valid GOOS/GOARCH targets. + +for tgt in $(go tool dist list); +do + o="$(echo ${tgt} | cut -f1 -d '/')" + a="$(echo ${tgt} | cut -f2 -d '/')" + out="$(env GOOS=${o} GOARCH=${a} go build ./... 2>&1)" + ret=${?} + if [ $ret -ne 0 ]; + then + echo "OS: ${o}" + echo "ARCH: ${a}" + echo "${out}" + echo + echo + fi +done diff --git a/go.mod b/go.mod index c6301fc..31cf31a 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/shirou/gopsutil/v4 v4.25.12 go4.org/netipx v0.0.0-20231129151722-fdeea329fbba golang.org/x/sys v0.40.0 - r00t2.io/sysutils v1.16.0 + r00t2.io/sysutils v1.16.1 ) require ( diff --git a/logging/consts_nix.go b/logging/consts_nix.go index 3f06036..adc5d7a 100644 --- a/logging/consts_nix.go +++ b/logging/consts_nix.go @@ -1,5 +1,4 @@ //go:build !(windows || plan9 || wasip1 || js || ios) -// +build !windows,!plan9,!wasip1,!js,!ios // I mean maybe it works for plan9 and ios, I don't know. diff --git a/logging/consts_darwin.go b/logging/consts_oldnix.go similarity index 72% rename from logging/consts_darwin.go rename to logging/consts_oldnix.go index c155eaf..2e220e9 100644 --- a/logging/consts_darwin.go +++ b/logging/consts_oldnix.go @@ -1,3 +1,5 @@ +//go:build !(windows || plan9 || wasip1 || js || ios || linux) + package logging var ( diff --git a/logging/funcs_oldnix.go b/logging/funcs_oldnix.go index 4075a6e..0aad621 100644 --- a/logging/funcs_oldnix.go +++ b/logging/funcs_oldnix.go @@ -1,5 +1,4 @@ //go:build !(windows || plan9 || wasip1 || js || ios || linux) -// +build !windows,!plan9,!wasip1,!js,!ios,!linux // Linux is excluded because it has its own. diff --git a/tplx/sprigx/README.adoc b/tplx/sprigx/README.adoc index 71b3dcc..0c19788 100644 --- a/tplx/sprigx/README.adoc +++ b/tplx/sprigx/README.adoc @@ -17,7 +17,7 @@ Last rendered {localdatetime} [id="wat"] == What is SprigX? -SprigX are extensions to https://masterminds.github.io/sprig/[the `sprig` library^] (https://pkg.go.dev/github.com/Masterminds/sprig/v3[Go docs^]). +SprigX is a suite of extensions to https://masterminds.github.io/sprig/[the `sprig` library^] (https://pkg.go.dev/github.com/Masterminds/sprig/v3[Go docs^]). They provide functions that offer more enriched use cases and domain-specific data. @@ -102,6 +102,8 @@ var txtTpl *template.Template = template. ---- ==== +Or, as a convenience, you can simply use the <> and/or <> functions. + If a `