Fixed code smells
This commit is contained in:
@@ -47,10 +47,6 @@ func decodeTime(b []byte) time.Time {
|
||||
return time.Unix(int64(binary.LittleEndian.Uint32(b)), 0).UTC()
|
||||
}
|
||||
|
||||
func encodeFrequency(b []byte, f float64) {
|
||||
binary.LittleEndian.PutUint32(b, uint32(f*1e3))
|
||||
}
|
||||
|
||||
func decodeFrequency(b []byte) float64 {
|
||||
return float64(int64(binary.LittleEndian.Uint32(b))) / 1e3
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user