Backend: Code clean-up
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
parent
6c13b75562
commit
8eb4b605c8
4 changed files with 4 additions and 6 deletions
|
@ -226,5 +226,5 @@ func (m *File) Panorama() bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
return m.FileProjection != ProjectionDefault || m.FileWidth / m.FileHeight > 2
|
return m.FileProjection != ProjectionDefault || m.FileWidth/m.FileHeight > 2
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ type Photo struct {
|
||||||
PhotoPrivate bool `json:"Private"`
|
PhotoPrivate bool `json:"Private"`
|
||||||
PhotoReview bool `json:"Review"`
|
PhotoReview bool `json:"Review"`
|
||||||
PhotoScan bool `json:"Scan"`
|
PhotoScan bool `json:"Scan"`
|
||||||
PhotoPanorama bool `json:"Panorama"`
|
PhotoPanorama bool `json:"Panorama"`
|
||||||
PhotoAltitude int `json:"Altitude"`
|
PhotoAltitude int `json:"Altitude"`
|
||||||
PhotoLat float32 `json:"Lat"`
|
PhotoLat float32 `json:"Lat"`
|
||||||
PhotoLng float32 `json:"Lng"`
|
PhotoLng float32 `json:"Lng"`
|
||||||
|
|
|
@ -176,10 +176,10 @@ func TestLocation_Assign(t *testing.T) {
|
||||||
lat := -21.976301666666668
|
lat := -21.976301666666668
|
||||||
lng := 49.148046666666666
|
lng := 49.148046666666666
|
||||||
id := s2.Token(lat, lng)
|
id := s2.Token(lat, lng)
|
||||||
log.Printf("ID: %s", id)
|
// log.Printf("ID: %s", id)
|
||||||
o, err := places.FindLocation(id)
|
o, err := places.FindLocation(id)
|
||||||
|
|
||||||
log.Printf("Output: %+v", o)
|
// log.Printf("Output: %+v", o)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package txt
|
package txt
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -116,7 +115,6 @@ func Time(s string) (result time.Time) {
|
||||||
time.UTC)
|
time.UTC)
|
||||||
} else if found := DatePathRegexp.Find(b); len(found) > 0 { // Is it a date path like "2020/01/03"?
|
} else if found := DatePathRegexp.Find(b); len(found) > 0 { // Is it a date path like "2020/01/03"?
|
||||||
n := DateIntRegexp.FindAll(found, -1)
|
n := DateIntRegexp.FindAll(found, -1)
|
||||||
fmt.Println(n)
|
|
||||||
|
|
||||||
if len(n) < 2 || len(n) > 3 {
|
if len(n) < 2 || len(n) > 3 {
|
||||||
return result
|
return result
|
||||||
|
|
Loading…
Reference in a new issue