diff --git a/README.md b/README.md index fbfb95b..3b80d7d 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ > Bitbucket-API library for golang. -Support Bitbucket API v2.0. +Support Bitbucket API v2.0. And the response type is json format defined Bitbucket API. @@ -26,7 +26,7 @@ package main import ( "fmt" - "github.com/ktrysmt/go-bitbucket" + "github.com/ktrysmt/go-bitbucket" ) func main() { @@ -47,7 +47,7 @@ func main() { panic(err) } - fmt.Println(res) + fmt.Println(res) } ``` @@ -59,21 +59,19 @@ It does not correspond yet. Because there are many differences between v2.0 and - Bitbucket API v1.0 -It is officially recommended to use v2.0. -But unfortunately Bitbucket Server (formerly: Stash) API is still v1.0. +It is officially recommended to use v2.0. +But unfortunately Bitbucket Server (formerly: Stash) API is still v1.0. And The API v1.0 covers resources that the v2.0 API and API v2.0 is yet to cover. ## Development ### Install dependencies -It's using dep. +It's using `go mod`. ```sh -go get github.com/golang/dep/... -git clone https://github.com/ktrysmt/go-bitbucket -cd ./go-bitbucket -dep ensure +export GO111MODULE=auto # or, =on +go build ``` ### How to testing @@ -81,13 +79,13 @@ dep ensure Set your available user account to Global Env. ```sh -export BITBUCKET_TEST_USERNAME= -export BITBUCKET_TEST_PASSWORD= -export BITBUCKET_TEST_OWNER= +export BITBUCKET_TEST_USERNAME= +export BITBUCKET_TEST_PASSWORD= +export BITBUCKET_TEST_OWNER= export BITBUCKET_TEST_REPOSLUG= ``` -Refs; URL Syntax is `https://:@bitbucket.org//.git`. +Refs; URL Syntax is `https://:@bitbucket.org//.git`. And just run, diff --git a/go.mod b/go.mod index 5931817..0371991 100644 --- a/go.mod +++ b/go.mod @@ -3,13 +3,15 @@ module github.com/ktrysmt/go-bitbucket go 1.12 require ( - github.com/golang/protobuf v1.0.0 + github.com/golang/protobuf v1.0.0 // indirect + github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // indirect github.com/k0kubun/pp v2.3.0+incompatible - github.com/mattn/go-colorable v0.0.9 - github.com/mattn/go-isatty v0.0.3 + github.com/mattn/go-colorable v0.0.9 // indirect + github.com/mattn/go-isatty v0.0.3 // indirect github.com/mitchellh/mapstructure v0.0.0-20180220230111-00c29f56e238 golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01 golang.org/x/oauth2 v0.0.0-20180227000427-d7d64896b5ff - golang.org/x/sys v0.0.0-20180224232135-f6cff0780e54 - google.golang.org/appengine v1.0.0 + golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect + golang.org/x/sys v0.0.0-20180224232135-f6cff0780e54 // indirect + google.golang.org/appengine v1.0.0 // indirect ) diff --git a/go.sum b/go.sum index be29874..5f67b58 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,22 @@ +github.com/golang/protobuf v1.0.0 h1:lsek0oXi8iFE9L+EXARyHIjU5rlWIhhTkjDz3vHhWWQ= github.com/golang/protobuf v1.0.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 h1:uC1QfSlInpQF+M0ao65imhwqKnz3Q2z/d8PWZRMQvDM= +github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= +github.com/k0kubun/pp v2.3.0+incompatible h1:EKhKbi34VQDWJtq+zpsKSEhkHHs9w2P8Izbq8IhLVSo= github.com/k0kubun/pp v2.3.0+incompatible/go.mod h1:GWse8YhT0p8pT4ir3ZgBbfZild3tgzSScAn6HmfYukg= +github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3 h1:ns/ykhmWi7G9O+8a448SecJU3nSMBXJfqQkl0upE1jI= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mitchellh/mapstructure v0.0.0-20180220230111-00c29f56e238 h1:+MZW2uvHgN8kYvksEN3f7eFL2wpzk0GxmlFsMybWc7E= github.com/mitchellh/mapstructure v0.0.0-20180220230111-00c29f56e238/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01 h1:po1f06KS05FvIQQA2pMuOWZAUXiy1KYdIf0ElUU2Hhc= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/oauth2 v0.0.0-20180227000427-d7d64896b5ff h1:WbI0V2v8RZPTlOMrecBqqba3029Z6l7jeFySSGaN/jk= golang.org/x/oauth2 v0.0.0-20180227000427-d7d64896b5ff/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180224232135-f6cff0780e54 h1:4qAtdeqGYyXU2CfUvLomEFw0cl5IxNxmEhXL52ODpiU= golang.org/x/sys v0.0.0-20180224232135-f6cff0780e54/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +google.golang.org/appengine v1.0.0 h1:dN4LljjBKVChsv0XCSI+zbyzdqrkEwX5LQFUMRSGqOc= google.golang.org/appengine v1.0.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=