encoding/asn1: cannot marshal into slice of strings and pass stringtype parameter tags to members #18834
Labels
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone
What version of Go are you using (
go version
)?go version go1.7.5 linux/amd64
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GORACE=""
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build372878858=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1
Issue
I need to be able to marshal into a slice of strings and to be able to specify the string types for the elements in this slice (is5, generalstring, etc)
https://play.golang.org/p/l5id74lMoI
Issue seems to be two fold:
Suggestion
When struct tags for string types are defined against a slice this should be accepted if the slice is of strings
The struct tag for the string type should be passed down to the marshaling of the members of the slice
The text was updated successfully, but these errors were encountered: