Backend: Code clean-up

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2020-07-16 14:10:21 +02:00
parent 6c13b75562
commit 8eb4b605c8
4 changed files with 4 additions and 6 deletions

View file

@ -226,5 +226,5 @@ func (m *File) Panorama() bool {
return false
}
return m.FileProjection != ProjectionDefault || m.FileWidth / m.FileHeight > 2
return m.FileProjection != ProjectionDefault || m.FileWidth/m.FileHeight > 2
}

View file

@ -36,7 +36,7 @@ type Photo struct {
PhotoPrivate bool `json:"Private"`
PhotoReview bool `json:"Review"`
PhotoScan bool `json:"Scan"`
PhotoPanorama bool `json:"Panorama"`
PhotoPanorama bool `json:"Panorama"`
PhotoAltitude int `json:"Altitude"`
PhotoLat float32 `json:"Lat"`
PhotoLng float32 `json:"Lng"`

View file

@ -176,10 +176,10 @@ func TestLocation_Assign(t *testing.T) {
lat := -21.976301666666668
lng := 49.148046666666666
id := s2.Token(lat, lng)
log.Printf("ID: %s", id)
// log.Printf("ID: %s", id)
o, err := places.FindLocation(id)
log.Printf("Output: %+v", o)
// log.Printf("Output: %+v", o)
if err != nil {
t.Fatal(err)

View file

@ -1,7 +1,6 @@
package txt
import (
"fmt"
"regexp"
"strconv"
"strings"
@ -116,7 +115,6 @@ func Time(s string) (result time.Time) {
time.UTC)
} else if found := DatePathRegexp.Find(b); len(found) > 0 { // Is it a date path like "2020/01/03"?
n := DateIntRegexp.FindAll(found, -1)
fmt.Println(n)
if len(n) < 2 || len(n) > 3 {
return result