Web lists-archives.com

Bug#879748: ITP: golang-github-alecthomas-repr -- Python's repr() for Go




Package: wnpp
Severity: wishlist
Owner: Anthony Fok <foka@xxxxxxxxxx>

* Package name    : golang-github-alecthomas-repr
  Version         : 0.0~git20171013.3757840-1
  Upstream Author : Alec Thomas
* URL             : https://github.com/alecthomas/repr
* License         : Expat
  Programming Lang: Go
  Description     : Python's repr() for Go

 The repr package attempts to represent Go values in a form that can be
 used almost directly in Go source code.
 .
 Unfortunately, some values (such as pointers to basic types) cannot
 be represented directly in Go.  These values will be represented as
 &<value>, e.g. &23
 .
 Example:
 .
   type test struct {
     S string
     I int
     A []int
   }
 .
   func main() {
     repr.Print(&test{
       S: "String",
       I: 123,
       A: []int{1, 2, 3},
     })
   }
 .
 Outputs
 .
   &main.test{S: "String", I: 123, A: []int{1, 2, 3}}

Reasoning: Required by golang-github-alecthomas-chroma for hugo:
 Hugo 0.28 brings blistering fast and native syntax highlighting
 from Chroma.  A big thank you to Alec Thomas for taking on this
 massive task of porting the popular python highlighter Pygments to Go.