Golang encoding/gob.Decoder.DecodeValue() function example
package encoding/gob
DecodeValue reads the next value from the input stream. If v(1st parameter) is the zero reflect.Value (v.Kind() == Invalid), DecodeValue discards the value. Otherwise, it stores the value into v. In that case, v must represent a non-nil pointer to data or be an assignable reflect.Value (v.CanSet()) If the input is at EOF, DecodeValue returns io.EOF and does not modify e.
Golang encoding/gob.Decoder.DecodeValue() function usage example
func (ed *encDec) decode(value reflect.Value) error {
ed.decLock.Lock()
err := ed.dec.DecodeValue(value) // <--- here
if err != nil {
return err
}
ed.decLock.Unlock()
return err
}
Reference :
http://golang.org/pkg/encoding/gob/#Decoder.DecodeValue
https://gowalker.org/code.google.com/p/go.exp/old/netchan?f=common.go
Advertisement
Something interesting
Tutorials
+15.1k Golang : Send email with attachment(RFC2822) using Gmail API example
+19.2k Golang : Read input from console line
+7.7k Golang : Hue, Saturation and Value(HSV) with OpenCV example
+12k Golang : Find age or leap age from date of birth example
+23.2k Golang : Test file read write permission example
+6.3k Golang : Missing Subversion command
+9.4k Golang : Intercept and compare HTTP response code example
+10.6k Golang : Convert file unix timestamp to UTC time example
+31.9k Golang : bufio.NewReader.ReadLine to read file line by line
+11.9k Golang : Simple file scaning and remove virus example
+33k Golang : Regular Expression for alphanumeric and underscore
+5.5k Golang : Experimental Jawi programming language