File tree Expand file tree Collapse file tree 3 files changed +37
-0
lines changed Expand file tree Collapse file tree 3 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ module github.com/taigrr/temper-cli
2
+
3
+ go 1.20
4
+
5
+ require github.com/taigrr/temper v1.1.0
Original file line number Diff line number Diff line change
1
+ github.com/taigrr/temper v1.1.0 h1:tSKBrpDcfNffZPu7wOzQjJQVVUQkbf5+D5lwizwSk3s =
2
+ github.com/taigrr/temper v1.1.0 /go.mod h1:C5OtMbTQ1dtvWsjKALYF4L0lC+XltSC8kpHdRa5z9Yc =
Original file line number Diff line number Diff line change
1
+ package main
2
+
3
+ import (
4
+ "fmt"
5
+ "log"
6
+
7
+ "github.com/taigrr/temper"
8
+ )
9
+
10
+ var tempers []* temper.Temper
11
+
12
+ func main () {
13
+ tempers , err := temper .FindTempers ()
14
+ if err != nil {
15
+ panic (err )
16
+ }
17
+ if len (tempers ) == 0 {
18
+ log .Fatal ("no tempers found\n " )
19
+ }
20
+ for _ , t := range tempers {
21
+ defer t .Close ()
22
+ }
23
+ for _ , t := range tempers {
24
+ c , err := t .ReadC ()
25
+ if err != nil {
26
+ panic (err )
27
+ }
28
+ fmt .Printf ("%.2f\n " , c )
29
+ }
30
+ }
You can’t perform that action at this time.
0 commit comments