Skip to content

go 1.17.7 new issue #198

@jdvjdv82

Description

@jdvjdv82

Hi there,
please consider following:

type Mode uint8

const (
	Reserved Mode = iota
        Foo
        Bar
)
func (m Mode) String() string {
	switch m {
	case Foo:
		return "Foo"
	case Bar:
		return "Bar"
       default:
		return "Reserved"
	}
}

For golang < 1.17.7 I was using {{ .Mode }} and it was displayed as 0, 1, 2
Now it is displayed as Reserved, Foo, Bar.

So Stringer interface somehow kicks in.

There is easy workaround, but I just want to know if there is need to adjust Jet or file an issue to golang directly.

Thanks and all the best

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions