From f443181b9c9327d339037134dd9f6e724958fe08 Mon Sep 17 00:00:00 2001 From: andig Date: Thu, 26 Jul 2018 08:37:30 +0200 Subject: [PATCH] Minor cleanup (#57) --- datagram.go | 3 +-- textline.go | 20 -------------------- 2 files changed, 1 insertion(+), 22 deletions(-) delete mode 100644 textline.go diff --git a/datagram.go b/datagram.go index d5f8fc3..892863b 100644 --- a/datagram.go +++ b/datagram.go @@ -267,7 +267,7 @@ type QuerySnip struct { Transform RTUTransform `json:"-"` } -// MarshalJSON converts QuerySnip to json, replaceing ReadTimestamp with unix tiem representation +// MarshalJSON converts QuerySnip to json, replacing ReadTimestamp with unix time representation func (q *QuerySnip) MarshalJSON() ([]byte, error) { return json.Marshal(struct { DeviceId uint8 @@ -385,7 +385,6 @@ func (r *Readings) MergeSnip(q QuerySnip) { default: log.Fatalf("Cannot merge unknown snip type - snip is %+v", q) } - } func (q QuerySnip) String() string { diff --git a/textline.go b/textline.go deleted file mode 100644 index 2b18707..0000000 --- a/textline.go +++ /dev/null @@ -1,20 +0,0 @@ -package sdm630 - -import ( - "fmt" -) - -type TextDumper struct { - datastream ReadingChannel -} - -func NewTextDumper(ds ReadingChannel) *TextDumper { - return &TextDumper{datastream: ds} -} - -func (td *TextDumper) ConsumeData() { - for { - readings := <-td.datastream - fmt.Printf("%s\r\n", &readings) - } -}