From ab1c9aadb8f293e2de3df96dd5df09cccaf21dcd Mon Sep 17 00:00:00 2001 From: Paul Lhussiez Date: Mon, 23 Jul 2018 11:19:45 +0200 Subject: [PATCH] Adding go1.11 module support, and updating documentation --- Gopkg.lock | 4 ++-- README.md | 18 ++++++++++++++---- go.mod | 18 ++++++++++++++++++ go.sum | 28 ++++++++++++++++++++++++++++ 4 files changed, 62 insertions(+), 6 deletions(-) create mode 100644 go.mod create mode 100644 go.sum diff --git a/Gopkg.lock b/Gopkg.lock index 3f02757..ef07ee0 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -73,8 +73,8 @@ [[projects]] name = "github.com/stretchr/testify" packages = ["assert"] - revision = "12b6f73e6084dad08a7c6e575284b177ecafbc71" - version = "v1.2.1" + revision = "f35b8ab0b5a2cef36673838d662e249dd9c94686" + version = "v1.2.2" [[projects]] name = "gopkg.in/russross/blackfriday.v2" diff --git a/README.md b/README.md index 83621bf..03a3aed 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # bfchroma -![Go Version](https://img.shields.io/badge/go-1.8-brightgreen.svg) -![Go Version](https://img.shields.io/badge/go-1.9-brightgreen.svg) +![Go Version](https://img.shields.io/badge/go-1.10-brightgreen.svg) [![Go Report Card](https://goreportcard.com/badge/github.com/Depado/bfchroma)](https://goreportcard.com/report/github.com/Depado/bfchroma) [![Build Status](https://drone.depado.eu/api/badges/Depado/bfchroma/status.svg)](https://drone.depado.eu/Depado/bfchroma) [![codecov](https://codecov.io/gh/Depado/bfchroma/branch/master/graph/badge.svg)](https://codecov.io/gh/Depado/bfchroma) @@ -10,7 +9,8 @@ [![Say Thanks!](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/Depado) -Integrating [Chroma](https://github.com/alecthomas/chroma) syntax highlighter as a [Blackfriday](https://github.com/russross/blackfriday) renderer. +Integrating [Chroma](https://github.com/alecthomas/chroma) syntax highlighter as +a [Blackfriday](https://github.com/russross/blackfriday) renderer. ## Install and prerequisites @@ -19,7 +19,17 @@ This project requires and uses the `v2` version of [this issue](https://github.com/Depado/bfchroma/issues/3) I decided to rollback to the `gopkg.in` version so the lib can be go gettable. -`go get -u github.com/Depado/bfchroma` +``` +$ go get -u github.com/Depado/bfchroma +``` + +You can also install it directly by using dep in your project: + +``` +$ dep ensure -add github.com/Depado/bfchroma +``` + +_Additionnaly, this project uses the module approach of go 1.11_ ## Features diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..917762c --- /dev/null +++ b/go.mod @@ -0,0 +1,18 @@ +module github.com/Depado/bfchroma + +require ( + github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 // indirect + github.com/alecthomas/chroma v0.4.0 + github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721 // indirect + github.com/alecthomas/repr v0.0.0-20180616030925-f49988b46e02 // indirect + github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect + github.com/davecgh/go-spew v1.1.0 // indirect + github.com/dlclark/regexp2 v1.1.6 // indirect + github.com/mattn/go-isatty v0.0.3 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/sergi/go-diff v1.0.0 // indirect + github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95 // indirect + github.com/stretchr/testify v1.2.1 + golang.org/x/sys v0.0.0-20180715085529-ac767d655b30 // indirect + gopkg.in/russross/blackfriday.v2 v2.0.0 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..a333090 --- /dev/null +++ b/go.sum @@ -0,0 +1,28 @@ +github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 h1:smF2tmSOzy2Mm+0dGI2AIUHY+w0BUc+4tn40djz7+6U= +github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI= +github.com/alecthomas/chroma v0.4.0 h1:asyiVqfr7T9308T8sgZnopIXhb0SiZVIXNp89V+b46I= +github.com/alecthomas/chroma v0.4.0/go.mod h1:MmozekIi2rfQSzDcdEZ2BoJ9Pxs/7uc2Y4Boh+hIeZo= +github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721 h1:JHZL0hZKJ1VENNfmXvHbgYlbUOvpzYzvy2aZU5gXVeo= +github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= +github.com/alecthomas/repr v0.0.0-20180616030925-f49988b46e02 h1:FOthsj5sFvHz208TzkE6d3W1+H7Td9jQ4Twl63noVCE= +github.com/alecthomas/repr v0.0.0-20180616030925-f49988b46e02/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= +github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ= +github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dlclark/regexp2 v1.1.6 h1:CqB4MjHw0MFCDj+PHHjiESmHX+N7t0tJzKvC6M97BRg= +github.com/dlclark/regexp2 v1.1.6/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= +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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95 h1:/vdW8Cb7EXrkqWGufVMES1OH2sU9gKVb2n9/1y5NMBY= +github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/stretchr/testify v1.2.1 h1:52QO5WkIUcHGIR7EnGagH88x1bUzqGXTC5/1bDTUQ7U= +github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +golang.org/x/sys v0.0.0-20180715085529-ac767d655b30 h1:4bYUqrXBoiI7UFQeibUwFhvcHfaEeL75O3lOcZa964o= +golang.org/x/sys v0.0.0-20180715085529-ac767d655b30/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +gopkg.in/russross/blackfriday.v2 v2.0.0 h1:+FlnIV8DSQnT7NZ43hcVKcdJdzZoeCmJj4Ql8gq5keA= +gopkg.in/russross/blackfriday.v2 v2.0.0/go.mod h1:6sSBNz/GtOm/pJTuh5UmBK2ZHfmnxGbl2NZg1UliSOI=