// Implementation of dns.Wirer
Implementation of dns.Wirer
// Implementation of dns . Wirer
func (rd *GPOS) Decode(b []byte, pos *int, sniffer dns.WireDecodeSniffer) (err error) {
	p0 := &b[*pos]
	var s dns.CharString
	if err = s.Decode(b, pos, sniffer); err != nil {
		return
	}
	if _, err = fmt.Sscanf(string(s), "%f", &rd.Longitude); err != nil {
		return
	}
	if err = s.Decode(b, pos, sniffer); err != nil {
		return
	}
	if _, err = fmt.Sscanf(string(s), "%f", &rd.Latitude); err != nil {
		return
	}
	if err = s.Decode(b, pos, sniffer); err != nil {
		return
	}
	if _, err = fmt.Sscanf(string(s), "%f", &rd.Altitude); err != nil {
		return
	}
	if sniffer != nil {
		sniffer(p0, &b[*pos-1], dns.SniffRDataGPOS, rd)
	}
	return
}
func ( rd * GPOS ) Decode ( b [ ] byte , pos * int , sniffer dns . WireDecodeSniffer ) ( err error ) { p0 := & b [ * pos ] var s dns . CharString if err = s . Decode ( b , pos , sniffer ) ; err != nil { return } if _ , err = fmt . Sscanf ( string ( s ) , " " , & rd . Longitude ) ; err != nil { return } if err = s . Decode ( b , pos , sniffer ) ; err != nil { return } if _ , err = fmt . Sscanf ( string ( s ) , " " , & rd . Latitude ) ; err != nil { return } if err = s . Decode ( b , pos , sniffer ) ; err != nil { return } if _ , err = fmt . Sscanf ( string ( s ) , " " , & rd . Altitude ) ; err != nil { return } if sniffer != nil { sniffer ( p0 , & b [ * pos - 1 ] , dns . SniffRDataGPOS , rd ) } return }
Implementation of dns.Wirer
Implementation of dns . Wirer