diff --git a/Makefile b/Makefile index 8a8eee5..35e59eb 100644 --- a/Makefile +++ b/Makefile @@ -18,5 +18,5 @@ check: pre-commit run --all-files -README.md: ./add-docs-to-readme.sh *.go +README.md: ./add-docs-to-readme.sh *.go go.mod ./add-docs-to-readme.sh diff --git a/README.md b/README.md index ef1d9b7..b0e375b 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Slog lets you hide or show debug logs as well as provides a simpler way to log m Also provided are a few simple methods for handling returned `error` variables, logging them out and optionally panicing or fatally exiting. ## Documentation - package slog // import "git.iamthefij.com/iamthefij/slog" + package slog // import "git.iamthefij.com/iamthefij/slog/v2" Package slog is a super simple logger that allows a few convenience methods for handling debug vs warning/error logs. It also adds a few conveniences diff --git a/add-docs-to-readme.sh b/add-docs-to-readme.sh index 2c2f74d..cb65fed 100755 --- a/add-docs-to-readme.sh +++ b/add-docs-to-readme.sh @@ -4,5 +4,5 @@ set -e slogdir=$(dirname "$0") readme="$slogdir/README.md" -awk '/## Documentation/ {print ; exit} {print}' "$readme" > "$readme.tmp" && go doc -all slog | sed "s/^/ /;s/[ \t]*$//" >> "$readme.tmp" +awk '/## Documentation/ {print ; exit} {print}' "$readme" > "$readme.tmp" && go doc -all slog/v2 | sed "s/^/ /;s/[ \t]*$//" >> "$readme.tmp" mv "$readme.tmp" "$readme"