Golang encoding/asn1.RawContent type example
package encoding/asn1
RawContent is used to signal that the undecoded, DER data needs to be preserved for a struct. To use it, the first field of the struct must have this type. It's an error for any of the other fields to have this type.
Golang encoding/asn1.RawContent type usage example ( example taken from https://code.google.com/p/go/source/browse/src/pkg/crypto/x509/x509.go )
type certificate struct {
Raw asn1.RawContent // <--- first field!
TBSCertificate tbsCertificate
SignatureAlgorithm pkix.AlgorithmIdentifier
SignatureValue asn1.BitString
}
Reference :
Advertisement
Something interesting
Tutorials
+6.5k Elasticsearch : Shutdown a local node
+12.4k Golang : Search and extract certain XML data example
+5.7k Golang : Error handling methods
+15k Golang : How do I get the local IP (non-loopback) address ?
+5.2k Responsive Google Adsense
+27.9k Golang : Decode/unmarshal unknown JSON data type with map[string]interface
+8.3k Golang : Configure Apache and NGINX to access your Go service example
+8.8k Golang : HTTP Routing with Goji example
+32.4k Golang : Math pow(the power of x^y) example
+6.3k Golang : Extract sub-strings
+13.7k Golang : Activate web camera and broadcast out base64 encoded images
+10.5k Golang : Select region of interest with mouse click and crop from image