@ -1,2 +1,3 @@ |
|||
*.csv |
|||
*.csv.gz |
|||
*.log |
@ -1,9 +1,9 @@ |
|||
package main |
|||
|
|||
import "fmt" |
|||
import "log" |
|||
|
|||
func check(err error) { |
|||
if err != nil { |
|||
fmt.Println(err) |
|||
log.Println(err) |
|||
} |
|||
} |
@ -0,0 +1,18 @@ |
|||
package main |
|||
|
|||
import ( |
|||
"io" |
|||
"log" |
|||
"os" |
|||
"time" |
|||
) |
|||
|
|||
func savelog() { |
|||
timeS := time.Now().String() |
|||
logFile, err := os.OpenFile("log-"+timeS+".log", os.O_CREATE|os.O_APPEND|os.O_RDWR, 0666) |
|||
if err != nil { |
|||
panic(err) |
|||
} |
|||
mw := io.MultiWriter(os.Stdout, logFile) |
|||
log.SetOutput(mw) |
|||
} |
@ -1,18 +1,23 @@ |
|||
package main |
|||
|
|||
type LocationModel struct { |
|||
Type string `json:"type"` |
|||
Coordinates []float64 `json:"coordinates"` |
|||
} |
|||
type CellModel struct { |
|||
Radio string `json:"radio"` |
|||
MCC string `json:"mcc"` |
|||
Net int `json:"net"` |
|||
Area int `json:"area"` |
|||
Cell int `json:"cell"` |
|||
Unit int `json:"unit"` |
|||
Lat float64 `json:"lat"` |
|||
Lon float64 `json:"lon"` |
|||
Range float64 `json:"range"` |
|||
Samples int `json:"samples"` |
|||
Changeable string `json:"changeable"` |
|||
Created int64 `json:"created"` |
|||
Updated int64 `json:"updated"` |
|||
AverageSignal float64 `json:"averagesignal"` |
|||
Radio string `json:"radio"` |
|||
MCC string `json:"mcc"` |
|||
Net int `json:"net"` |
|||
Area int `json:"area"` |
|||
Cell int `json:"cell"` |
|||
Unit int `json:"unit"` |
|||
Lat float64 `json:"lat"` |
|||
Lon float64 `json:"lon"` |
|||
Location LocationModel `json:"location"` |
|||
Range float64 `json:"range"` |
|||
Samples int `json:"samples"` |
|||
Changeable string `json:"changeable"` |
|||
Created int64 `json:"created"` |
|||
Updated int64 `json:"updated"` |
|||
AverageSignal float64 `json:"averagesignal"` |
|||
} |