Skip to content

Commit

Permalink
Remove "// nolint" declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
ecc1 committed Sep 27, 2017
1 parent 44a5e07 commit d9092de
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
2 changes: 0 additions & 2 deletions cmd/rawpage/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ var (
pageTypeFlag = flag.Int("p", int(dexcom.EGVData), "page `type` to read")
)

// nolint
func usage() {
fmt.Fprintf(os.Stderr, "Usage: %s [options]\n", os.Args[0])
flag.PrintDefaults()
Expand All @@ -29,7 +28,6 @@ func main() {
flag.Parse()
pageType := dexcom.PageType(*pageTypeFlag)
if pageType < dexcom.FirstPageType || dexcom.LastPageType < pageType {
// nolint
fmt.Fprintf(os.Stderr, "invalid page type (%d)\n", *pageTypeFlag)
flag.Usage()
os.Exit(1)
Expand Down
2 changes: 0 additions & 2 deletions cmd/show/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ var (
rawFlag = flag.Bool("r", false, "show raw record data")
)

// nolint
func usage() {
fmt.Fprintf(os.Stderr, "Usage: %s [options]\n", os.Args[0])
flag.PrintDefaults()
Expand All @@ -34,7 +33,6 @@ func main() {
flag.Parse()
pageType := dexcom.PageType(*pageTypeFlag)
if pageType < dexcom.FirstPageType || dexcom.LastPageType < pageType {
// nolint
fmt.Fprintf(os.Stderr, "invalid page type (%d)\n", *pageTypeFlag)
flag.Usage()
os.Exit(1)
Expand Down
9 changes: 8 additions & 1 deletion record.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,45 @@ import (
"time"
)

// nolint
type (
// Record represents a time-stamped Dexcom receiver record.
Record struct {
Timestamp Timestamp
Info interface{}
}

// Records represents a sequence of records.
Records []Record

// SensorInfo represents a sensor reading.
SensorInfo struct {
Unfiltered uint32
Filtered uint32
RSSI int8
Unknown byte
}

// EGVInfo represents an estimated glucose value.
EGVInfo struct {
Glucose uint16
DisplayOnly bool
Noise uint8
Trend Trend
}

// InsertionInfo represents a sensor change event.
InsertionInfo struct {
SystemTime time.Time
Event SensorChange
}

// MeterInfo represents a meter reading.
MeterInfo struct {
Glucose uint16
MeterTime time.Time
}

// CalibrationInfo represents a calibration event.
CalibrationInfo struct {
Slope float64
Intercept float64
Expand All @@ -47,6 +53,7 @@ type (
Data []CalibrationRecord
}

// CalibrationRecord represents a calibration data point.
CalibrationRecord struct {
TimeEntered time.Time
Glucose int32
Expand Down
7 changes: 4 additions & 3 deletions share.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,14 @@ func authenticate(device ble.Device, reauth bool) error {
if err != nil {
return err
}
auth, err := device.Conn().GetCharacteristic(authentication)
var auth ble.Characteristic
auth, err = device.Conn().GetCharacteristic(authentication)
if err != nil {
return err
}
if !reauth {
// nolint
data, err := auth.ReadValue()
var data []byte
data, err = auth.ReadValue()
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion usb.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ func (conn *usbConn) Receive(data []byte) error {

// Close closes the USB connection.
func (conn *usbConn) Close() {
conn.Port.Close() // nolint
_ = conn.Port.Close()
}

0 comments on commit d9092de

Please sign in to comment.