diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 090c2dc..d539f30 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: strategy: matrix: - go: [ '1.16.x', '1.17.x' ] + go: [ '1.17.x', '1.18.x' ] steps: - name: Set up Go @@ -39,7 +39,7 @@ jobs: - name: Download dependencies working-directory: ${{env.SRC_DIR}} - run: make deps-test + run: make deps - name: Run tests working-directory: ${{env.SRC_DIR}} diff --git a/.github/workflows/godoc.yml b/.github/workflows/godoc.yml deleted file mode 100644 index 8bf64c0..0000000 --- a/.github/workflows/godoc.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: GoDoc - -on: - create - -jobs: - GoDoc: - name: Generate docs - runs-on: ubuntu-latest - - steps: - - name: Trigger GoSumDB and PkgGoDev - uses: essentialkaos/pkgre-godoc-action@v1 diff --git a/Makefile b/Makefile index cd72b05..623c227 100644 --- a/Makefile +++ b/Makefile @@ -1,26 +1,36 @@ ################################################################################ -# This Makefile generated by GoMakeGen 1.3.2 using next command: -# gomakegen . +# This Makefile generated by GoMakeGen 1.5.1 using next command: +# gomakegen --mod . # # More info: https://kaos.sh/gomakegen ################################################################################ +export GO111MODULE=on + .DEFAULT_GOAL := help -.PHONY = fmt vet git-config deps-test test help +.PHONY = fmt vet deps-test test mod-init mod-update help ################################################################################ -git-config: ## Configure git redirects for stable import path services - git config --global http.https://pkg.re.followRedirects true +deps: mod-update ## Download dependencies -deps-test: git-config ## Download dependencies for tests - go get -d -v pkg.re/essentialkaos/check.v1 +deps-test: deps ## Download dependencies for tests test: ## Run tests go test -covermode=count . +mod-init: ## Initialize new module + go mod init + go mod tidy + +mod-update: ## Download modules to local cache + go mod download + +mod-vendor: ## Make vendored copy of dependencies + go mod vendor + fmt: ## Format source code with gofmt find . -name "*.go" -exec gofmt -s -w {} \; @@ -32,6 +42,6 @@ help: ## Show this info @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \ | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[33m%-12s\033[0m %s\n", $$1, $$2}' @echo -e '' - @echo -e '\033[90mGenerated by GoMakeGen 1.3.2\033[0m\n' + @echo -e '\033[90mGenerated by GoMakeGen 1.5.1\033[0m\n' ################################################################################ diff --git a/README.md b/README.md index 741268e..60cb62e 100644 --- a/README.md +++ b/README.md @@ -22,13 +22,13 @@ This is fork of [go.linenoise](https://github.com/GeertJohan/go.linenoise) packa For install, do: ``` -go get pkg.re/essentialkaos/go-linenoise.v3 +go get github.com/essentialkaos/go-linenoise ``` For update to latest stable release, do: ``` -go get -u pkg.re/essentialkaos/go-linenoise.v3 +go get -u github.com/essentialkaos/go-linenoise ``` ### Example @@ -41,7 +41,7 @@ package main import ( "fmt" - "pkg.re/essentialkaos/go-linenoise.v3" + "github.com/essentialkaos/go-linenoise" ) // ////////////////////////////////////////////////////////////////////////// // diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..383342f --- /dev/null +++ b/go.mod @@ -0,0 +1,11 @@ +module github.com/essentialkaos/go-linenoise + +go 1.17 + +require github.com/essentialkaos/check v1.2.1 + +require ( + github.com/kr/pretty v0.3.0 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/rogpeppe/go-internal v1.6.1 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..6d52f59 --- /dev/null +++ b/go.sum @@ -0,0 +1,14 @@ +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/essentialkaos/check v1.2.1 h1:avvyFy/1acUNwfxwuOLsHeCjfXtMygtbu0lVDr3nxFs= +github.com/essentialkaos/check v1.2.1/go.mod h1:PhxzfJWlf5L/skuyhzBLIvjMB5Xu9TIyDIsqpY5MvB8= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +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.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/linenoise.go b/linenoise.go index 97d3643..77450fb 100644 --- a/linenoise.go +++ b/linenoise.go @@ -1,9 +1,10 @@ +//go:build cgo || !windows // +build cgo !windows // Package linenoise wraps the linenoise library (https://github.com/antirez/linenoise). // // The package is imported with "go-" prefix -// import "pkg.re/essentialkaos/go-linenoise" +// import "github.com/essentialkaos/go-linenoise" // // Simple readline usage: // linenoise.Line("prompt> ") diff --git a/linenoise_test.go b/linenoise_test.go index 2820d0c..2c4f25e 100644 --- a/linenoise_test.go +++ b/linenoise_test.go @@ -5,7 +5,7 @@ package linenoise import ( "testing" - . "pkg.re/essentialkaos/check.v1" + . "github.com/essentialkaos/check" ) // ////////////////////////////////////////////////////////////////////////////////// // diff --git a/version.go b/version.go index 6033501..e93108d 100644 --- a/version.go +++ b/version.go @@ -3,6 +3,6 @@ package linenoise // ///////////////////////////////////////////////////////////////////////////////// // // VERSION is current version of go-linenoise package -const VERSION = "3.3.3" +const VERSION = "3.3.4" // ///////////////////////////////////////////////////////////////////////////////// //