Merge pull request #29 from multiformats/feat/gomod

Switch to multiformats/go-base32, introduce gomod
This commit is contained in:
Jakub Sztandera
2019-02-27 13:28:37 +01:00
committed by GitHub
6 changed files with 33 additions and 14 deletions

View File

@@ -1,23 +1,32 @@
language: go
sudo: false
os: os:
- linux - linux
language: go
go: go:
- 1.11.x - 1.11.x
env:
global:
- GOTFLAGS="-race"
matrix:
- BUILD_DEPTYPE=gx
- BUILD_DEPTYPE=gomod
# disable travis install
install: install:
- make deps - true
script: script:
- bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh)
cache: cache:
directories: directories:
- $GOPATH/src/gx - $GOPATH/src/gx
- $GOPATH/pkg/mod
- /home/travis/.cache/go-build
notifications: notifications:
email: false email: false
env: GOTFLAGS="-race"

View File

@@ -1,7 +1,7 @@
package multibase package multibase
import ( import (
b32 "github.com/whyrusleeping/base32" b32 "github.com/multiformats/go-base32"
) )
var base32StdLowerPad = b32.NewEncodingCI("abcdefghijklmnopqrstuvwxyz234567") var base32StdLowerPad = b32.NewEncodingCI("abcdefghijklmnopqrstuvwxyz234567")

6
go.mod Normal file
View File

@@ -0,0 +1,6 @@
module github.com/multiformats/go-multibase
require (
github.com/mr-tron/base58 v1.1.0
github.com/multiformats/go-base32 v0.0.3
)

4
go.sum Normal file
View File

@@ -0,0 +1,4 @@
github.com/mr-tron/base58 v1.1.0 h1:Y51FGVJ91WBqCEabAi5OPUz38eAx8DakuAm5svLcsfQ=
github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8=
github.com/multiformats/go-base32 v0.0.3 h1:tw5+NhuwaOjJCC5Pp82QuXbrmLzWg7uxlMFp8Nq/kkI=
github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA=

View File

@@ -6,7 +6,7 @@ import (
"fmt" "fmt"
b58 "github.com/mr-tron/base58/base58" b58 "github.com/mr-tron/base58/base58"
b32 "github.com/whyrusleeping/base32" b32 "github.com/multiformats/go-base32"
) )
// Encoding identifies the type of base-encoding that a multibase is carrying. // Encoding identifies the type of base-encoding that a multibase is carrying.

View File

@@ -7,17 +7,17 @@
"dvcsimport": "github.com/multiformats/go-multibase" "dvcsimport": "github.com/multiformats/go-multibase"
}, },
"gxDependencies": [ "gxDependencies": [
{
"author": "whyrusleeping",
"hash": "QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6",
"name": "base32",
"version": "0.0.2"
},
{ {
"author": "mr-tron", "author": "mr-tron",
"hash": "QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY", "hash": "QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY",
"name": "go-base58-fast", "name": "go-base58-fast",
"version": "0.1.1" "version": "0.1.1"
},
{
"author": "Golang",
"hash": "QmPbbYin7KBd1Y1BfUe15vHzwJiioyi3wtKQTtXWWf8SC5",
"name": "base32",
"version": "0.0.3"
} }
], ],
"gxVersion": "0.8.0", "gxVersion": "0.8.0",