4d5afd743f
`jsontoml` is very similar to `tomljson` It uses json.Unmarshal to convert read json to map and then converts the map to tree using `toml.TreeFromMap`. Then this tree is converted to toml using `tree.toTomlString()` The numbers when taken as input from json get converted to float64 because of how `json.Unmarshal()` converts all json numbers to float. Fixes #280
30 lines
910 B
YAML
30 lines
910 B
YAML
dist: bionic
|
|
language: go
|
|
services:
|
|
- docker
|
|
|
|
matrix:
|
|
allow_failures:
|
|
- go: tip
|
|
fast_finish: true
|
|
include:
|
|
- go: 1.11.x
|
|
- go: 1.12.x
|
|
env: WITH_FUZZ=true
|
|
- go: tip
|
|
env:
|
|
- GO111MODULE=on
|
|
- secure: "hhoCl77LhP25e+dLzmKphjdj+ep6jRfqON1JoxdvRXYjQqmhtxWSTJFqPyMLz2fNGSN8HUcyZZKTrOG6HkrapiIR5kjrnvm6Fzjp+IfClPoPu8xQUIbKd8E3BrDwvvF1JkkLImozxZbrbJhksJqN+QgG/Lv2vs6wkAfQjvGcRTQ="
|
|
script:
|
|
- if [ -n "$(go fmt ./...)" ]; then exit 1; fi
|
|
- go test github.com/pelletier/go-toml -race -coverprofile=coverage.txt -covermode=atomic
|
|
- go test github.com/pelletier/go-toml/cmd/tomljson
|
|
- go test github.com/pelletier/go-toml/cmd/jsontoml
|
|
- go test github.com/pelletier/go-toml/cmd/tomll
|
|
- go test github.com/pelletier/go-toml/query
|
|
- ./benchmark.sh $TRAVIS_BRANCH https://github.com/$TRAVIS_REPO_SLUG.git
|
|
- ./fuzzit.sh
|
|
|
|
after_success:
|
|
- bash <(curl -s https://codecov.io/bash)
|