Code clean-up (make fmt)
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
parent
ca8cfffc24
commit
fe705bb512
6 changed files with 20 additions and 22 deletions
|
@ -156,22 +156,22 @@ func (m LightMap) Hex() (result string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var ColorExamples = map[Color]string{
|
var ColorExamples = map[Color]string{
|
||||||
Red: "#E57373",
|
Red: "#E57373",
|
||||||
Magenta: "#FF00FF",
|
Magenta: "#FF00FF",
|
||||||
Pink: "#F06292",
|
Pink: "#F06292",
|
||||||
Orange: "#FFB74D",
|
Orange: "#FFB74D",
|
||||||
Brown: "#A1887F",
|
Brown: "#A1887F",
|
||||||
Gold: "#FFD54F",
|
Gold: "#FFD54F",
|
||||||
Yellow: "#FFF176",
|
Yellow: "#FFF176",
|
||||||
Lime: "#DCE775",
|
Lime: "#DCE775",
|
||||||
Green: "#81C784",
|
Green: "#81C784",
|
||||||
Teal: "#4DB6AC",
|
Teal: "#4DB6AC",
|
||||||
Cyan: "#4DD0E1",
|
Cyan: "#4DD0E1",
|
||||||
Blue: "#64B5F6",
|
Blue: "#64B5F6",
|
||||||
Purple: "#BA68C8",
|
Purple: "#BA68C8",
|
||||||
White: "#F5F5F5",
|
White: "#F5F5F5",
|
||||||
Grey: "#BDBDBD",
|
Grey: "#BDBDBD",
|
||||||
Black: "#333333",
|
Black: "#333333",
|
||||||
}
|
}
|
||||||
|
|
||||||
var ColorMap = map[color.RGBA]Color{
|
var ColorMap = map[color.RGBA]Color{
|
||||||
|
|
|
@ -252,4 +252,4 @@ var CountryNames = map[string]string{
|
||||||
"zm": "Zambia",
|
"zm": "Zambia",
|
||||||
"zw": "Zimbabwe",
|
"zw": "Zimbabwe",
|
||||||
"zz": "Unknown",
|
"zz": "Unknown",
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,8 +19,7 @@ import (
|
||||||
HAVING photo_count > 10)
|
HAVING photo_count > 10)
|
||||||
ORDER BY loc_country, album_name, taken_year;
|
ORDER BY loc_country, album_name, taken_year;
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
// Photo location
|
// Photo location
|
||||||
type Location struct {
|
type Location struct {
|
||||||
|
|
|
@ -86,6 +86,7 @@ func TestOSM_State(t *testing.T) {
|
||||||
assert.Equal(t, "Berlin", l.State())
|
assert.Equal(t, "Berlin", l.State())
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
func TestOSM_City(t *testing.T) {
|
func TestOSM_City(t *testing.T) {
|
||||||
t.Run("Berlin", func(t *testing.T) {
|
t.Run("Berlin", func(t *testing.T) {
|
||||||
|
|
|
@ -6,9 +6,9 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/photoprism/photoprism/internal/colors"
|
||||||
"github.com/photoprism/photoprism/internal/config"
|
"github.com/photoprism/photoprism/internal/config"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/photoprism/photoprism/internal/colors"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMediaFile_Colors_Testdata(t *testing.T) {
|
func TestMediaFile_Colors_Testdata(t *testing.T) {
|
||||||
|
|
|
@ -5,15 +5,13 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type CategoryLabel struct {
|
type CategoryLabel struct {
|
||||||
Name string
|
Name string
|
||||||
Title string
|
Title string
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Repo) CategoryLabels(limit, offset int) (results []CategoryLabel) {
|
func (s *Repo) CategoryLabels(limit, offset int) (results []CategoryLabel) {
|
||||||
q := s.db.NewScope(nil).DB()
|
q := s.db.NewScope(nil).DB()
|
||||||
|
|
||||||
// q.LogMode(true)
|
|
||||||
|
|
||||||
q = q.Table("categories").
|
q = q.Table("categories").
|
||||||
Select("label_name AS name").
|
Select("label_name AS name").
|
||||||
Joins("JOIN labels l ON categories.category_id = l.id").
|
Joins("JOIN labels l ON categories.category_id = l.id").
|
||||||
|
|
Loading…
Reference in a new issue