[pkg-go] Bug#827426: Can't reproduce
Martín Ferrari
tincho at tincho.org
Mon Nov 21 19:41:25 UTC 2016
tags 827426 + moreinfo unreproducible
thanks
Hi,
I have tried exactly what you have described (with the most current
x/tools), and I can't reproduce the problem. And stringer leaves a
generated file:
$ cat mytype_string.go
// Code generated by "stringer -type=MyType foo.go"; DO NOT EDIT
package main
import "fmt"
const _MyType_name = "Alpha"
var _MyType_index = [...]uint8{0, 5}
func (i MyType) String() string {
i -= 1
if i < 0 || i >= MyType(len(_MyType_index)-1) {
return fmt.Sprintf("MyType(%d)", i+1)
}
return _MyType_name[_MyType_index[i]:_MyType_index[i+1]]
}
--
Martín Ferrari (Tincho)
More information about the Pkg-go-maintainers
mailing list