[pkg-go] Bug#879748: ITP: golang-github-alecthomas-repr -- Python's repr() for Go
Anthony Fok
foka at debian.org
Wed Oct 25 10:03:07 UTC 2017
Package: wnpp
Severity: wishlist
Owner: Anthony Fok <foka at debian.org>
* 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.
More information about the Pkg-go-maintainers
mailing list