@@ -150,7 +150,7 @@ func (scale *SCAL) Parse(bytes []byte, size int64) error {
150150 s := int (size )
151151
152152 // No left over bytes
153- if 0 != len (bytes )% s {
153+ if len (bytes )% s != 0 {
154154 return errors .New ("SCAL: Invalid packet length" )
155155 }
156156
@@ -174,7 +174,7 @@ func (scale *SCAL) Parse(bytes []byte, size int64) error {
174174// Parse (ACCL) - Parse byte slice into ACCL struct and scale
175175func (accl * ACCL ) Parse (bytes []byte , scale * SCAL ) error {
176176 // Check length
177- if 6 != len (bytes ) {
177+ if len (bytes ) != 6 {
178178 return errors .New ("ACCL: Invalid packet length" )
179179 }
180180
@@ -190,7 +190,7 @@ func (accl *ACCL) Parse(bytes []byte, scale *SCAL) error {
190190// Parse (GYRO) - Parse byte slice into GYRO struct and scale
191191func (gyro * GYRO ) Parse (bytes []byte , scale * SCAL ) error {
192192 // Check length
193- if 6 != len (bytes ) {
193+ if len (bytes ) != 6 {
194194 return errors .New ("GYRO: Invalid packet length" )
195195 }
196196
@@ -206,8 +206,8 @@ func (gyro *GYRO) Parse(bytes []byte, scale *SCAL) error {
206206// Parse (GPS5) - Parse byte slice into GPS5 struct and scale
207207func (gps5 * GPS5 ) Parse (bytes []byte , scale * SCAL ) error {
208208 // Check length
209- if 20 != len (bytes ) {
210- return errors .New ("GPS5: Inavlid packet length" )
209+ if len (bytes ) != 20 {
210+ return errors .New ("GPS5: Invalid packet length" )
211211 }
212212
213213 // Geodetic location
@@ -226,7 +226,7 @@ func (gps5 *GPS5) Parse(bytes []byte, scale *SCAL) error {
226226// Parse (GPSF) - Parse byte slice into GPSF struct
227227func (gpsf * GPSF ) Parse (bytes []byte ) error {
228228 // Check length
229- if 4 != len (bytes ) {
229+ if len (bytes ) != 4 {
230230 return errors .New ("GPSF: Invalid packet length" )
231231 }
232232
@@ -240,7 +240,7 @@ func (gpsf *GPSF) Parse(bytes []byte) error {
240240// Parse (GPSP) - Parse byte slice into GPSP struct
241241func (gpsp * GPSP ) Parse (bytes []byte ) error {
242242 // Check length
243- if 2 != len (bytes ) {
243+ if len (bytes ) != 2 {
244244 return errors .New ("GPSP: Invalid packet length" )
245245 }
246246
@@ -254,7 +254,7 @@ func (gpsp *GPSP) Parse(bytes []byte) error {
254254// Parse (GPSU) - Parse byte slice int GPSU struct
255255func (gpsu * GPSU ) Parse (bytes []byte ) error {
256256 // Check length
257- if 16 != len (bytes ) {
257+ if len (bytes ) != 16 {
258258 return errors .New ("GPSU: Invalid packet length" )
259259 }
260260
@@ -274,7 +274,7 @@ func (gpsu *GPSU) Parse(bytes []byte) error {
274274// Parse (TMPC) - Parse byte slice int TMPC struct
275275func (tmpc * TMPC ) Parse (bytes []byte ) error {
276276 // Check length
277- if 4 != len (bytes ) {
277+ if len (bytes ) != 4 {
278278 return errors .New ("TMPC: Invalid packet length" )
279279 }
280280
@@ -291,8 +291,8 @@ func (tmpc *TMPC) Parse(bytes []byte) error {
291291// Parse (TSMP) - Parse byte slice int TSMP struct
292292func (tsmp * TSMP ) Parse (bytes []byte ) error {
293293 // Check length
294- if 4 != len (bytes ) {
295- return errors .New ("Invalid length TSMP packet" )
294+ if len (bytes ) != 4 {
295+ return errors .New ("invalid length TSMP packet" )
296296 }
297297
298298 // Total number of sample
0 commit comments