vendor/github.com/pelletier/go-toml/README.md
changeset 251 1c52a0eeb952
parent 242 2a9ec03fe5a1
child 256 6d9efbef00a9
equal deleted inserted replaced
250:c040f992052f 251:1c52a0eeb952
     1 # go-toml
     1 # go-toml
     2 
     2 
     3 Go library for the [TOML](https://github.com/mojombo/toml) format.
     3 Go library for the [TOML](https://github.com/mojombo/toml) format.
     4 
     4 
     5 This library supports TOML version
     5 This library supports TOML version
     6 [v0.4.0](https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md)
     6 [v0.5.0](https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.5.0.md)
     7 
     7 
     8 [![GoDoc](https://godoc.org/github.com/pelletier/go-toml?status.svg)](http://godoc.org/github.com/pelletier/go-toml)
     8 [![GoDoc](https://godoc.org/github.com/pelletier/go-toml?status.svg)](http://godoc.org/github.com/pelletier/go-toml)
     9 [![license](https://img.shields.io/github/license/pelletier/go-toml.svg)](https://github.com/pelletier/go-toml/blob/master/LICENSE)
     9 [![license](https://img.shields.io/github/license/pelletier/go-toml.svg)](https://github.com/pelletier/go-toml/blob/master/LICENSE)
    10 [![Build Status](https://travis-ci.org/pelletier/go-toml.svg?branch=master)](https://travis-ci.org/pelletier/go-toml)
    10 [![Build Status](https://dev.azure.com/pelletierthomas/go-toml-ci/_apis/build/status/pelletier.go-toml?branchName=master)](https://dev.azure.com/pelletierthomas/go-toml-ci/_build/latest?definitionId=1&branchName=master)
    11 [![Coverage Status](https://coveralls.io/repos/github/pelletier/go-toml/badge.svg?branch=master)](https://coveralls.io/github/pelletier/go-toml?branch=master)
    11 [![codecov](https://codecov.io/gh/pelletier/go-toml/branch/master/graph/badge.svg)](https://codecov.io/gh/pelletier/go-toml)
    12 [![Go Report Card](https://goreportcard.com/badge/github.com/pelletier/go-toml)](https://goreportcard.com/report/github.com/pelletier/go-toml)
    12 [![Go Report Card](https://goreportcard.com/badge/github.com/pelletier/go-toml)](https://goreportcard.com/report/github.com/pelletier/go-toml)
       
    13 [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fpelletier%2Fgo-toml.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fpelletier%2Fgo-toml?ref=badge_shield)
    13 
    14 
    14 ## Features
    15 ## Features
    15 
    16 
    16 Go-toml provides the following features for using data parsed from TOML documents:
    17 Go-toml provides the following features for using data parsed from TOML documents:
    17 
    18 
    96 
    97 
    97     ```
    98     ```
    98     go install github.com/pelletier/go-toml/cmd/tomljson
    99     go install github.com/pelletier/go-toml/cmd/tomljson
    99     tomljson --help
   100     tomljson --help
   100     ```
   101     ```
       
   102   
       
   103  * `jsontoml`: Reads a JSON file and outputs a TOML representation.
       
   104  
       
   105     ```
       
   106     go install github.com/pelletier/go-toml/cmd/jsontoml
       
   107     jsontoml --help
       
   108     ```
       
   109 
       
   110 ### Docker image
       
   111 
       
   112 Those tools are also availble as a Docker image from
       
   113 [dockerhub](https://hub.docker.com/r/pelletier/go-toml). For example, to
       
   114 use `tomljson`:
       
   115 
       
   116 ```
       
   117 docker run -v $PWD:/workdir pelletier/go-toml tomljson /workdir/example.toml
       
   118 ```
       
   119 
       
   120 Only master (`latest`) and tagged versions are published to dockerhub. You
       
   121 can build your own image as usual:
       
   122 
       
   123 ```
       
   124 docker build -t go-toml .
       
   125 ```
   101 
   126 
   102 ## Contribute
   127 ## Contribute
   103 
   128 
   104 Feel free to report bugs and patches using GitHub's pull requests system on
   129 Feel free to report bugs and patches using GitHub's pull requests system on
   105 [pelletier/go-toml](https://github.com/pelletier/go-toml). Any feedback would be
   130 [pelletier/go-toml](https://github.com/pelletier/go-toml). Any feedback would be
   106 much appreciated!
   131 much appreciated!
   107 
   132 
   108 ### Run tests
   133 ### Run tests
   109 
   134 
   110 You have to make sure two kind of tests run:
   135 `go test ./...`
   111 
       
   112 1. The Go unit tests
       
   113 2. The TOML examples base
       
   114 
       
   115 You can run both of them using `./test.sh`.
       
   116 
   136 
   117 ### Fuzzing
   137 ### Fuzzing
   118 
   138 
   119 The script `./fuzz.sh` is available to
   139 The script `./fuzz.sh` is available to
   120 run [go-fuzz](https://github.com/dvyukov/go-fuzz) on go-toml.
   140 run [go-fuzz](https://github.com/dvyukov/go-fuzz) on go-toml.