Backend: Format go imports

This commit is contained in:
Michael Mayer 2020-11-21 18:08:41 +01:00
parent 668025c050
commit 5daa689975
93 changed files with 194 additions and 103 deletions

View file

@ -1,11 +1,12 @@
package api
import (
"github.com/photoprism/photoprism/internal/i18n"
"github.com/tidwall/gjson"
"net/http"
"testing"
"github.com/photoprism/photoprism/internal/i18n"
"github.com/tidwall/gjson"
"github.com/stretchr/testify/assert"
)

View file

@ -3,7 +3,6 @@ package api
import (
"archive/zip"
"fmt"
"github.com/photoprism/photoprism/internal/thumb"
"net/http"
"strconv"
"strings"
@ -17,6 +16,7 @@ import (
"github.com/photoprism/photoprism/internal/photoprism"
"github.com/photoprism/photoprism/internal/query"
"github.com/photoprism/photoprism/internal/service"
"github.com/photoprism/photoprism/internal/thumb"
"github.com/photoprism/photoprism/pkg/fs"
"github.com/photoprism/photoprism/pkg/rnd"

View file

@ -1,6 +1,8 @@
package api
import (
"net/http"
"github.com/gin-gonic/gin"
"github.com/jinzhu/gorm"
"github.com/photoprism/photoprism/internal/acl"
@ -9,7 +11,6 @@ import (
"github.com/photoprism/photoprism/internal/form"
"github.com/photoprism/photoprism/internal/i18n"
"github.com/photoprism/photoprism/internal/query"
"net/http"
)
// POST /api/v1/batch/photos/archive

View file

@ -3,11 +3,12 @@ package api
import (
"encoding/json"
"fmt"
"net/http"
"testing"
"github.com/photoprism/photoprism/internal/i18n"
"github.com/stretchr/testify/assert"
"github.com/tidwall/gjson"
"net/http"
"testing"
)
func TestBatchPhotosArchive(t *testing.T) {

View file

@ -1,10 +1,11 @@
package api
import (
"github.com/tidwall/gjson"
"net/http"
"testing"
"github.com/tidwall/gjson"
"github.com/stretchr/testify/assert"
)

View file

@ -1,10 +1,11 @@
package api
import (
"github.com/tidwall/gjson"
"net/http"
"testing"
"github.com/tidwall/gjson"
"github.com/stretchr/testify/assert"
)

View file

@ -1,9 +1,10 @@
package api
import (
"github.com/photoprism/photoprism/internal/service"
"net/http"
"github.com/photoprism/photoprism/internal/service"
"github.com/photoprism/photoprism/internal/acl"
"github.com/photoprism/photoprism/internal/form"
"github.com/photoprism/photoprism/internal/i18n"

View file

@ -1,8 +1,9 @@
package api
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestSendFeedback(t *testing.T) {

View file

@ -1,9 +1,10 @@
package api
import (
"github.com/stretchr/testify/assert"
"net/http"
"testing"
"github.com/stretchr/testify/assert"
)
func TestDeleteFile(t *testing.T) {

View file

@ -2,10 +2,11 @@ package api
import (
"encoding/json"
"github.com/tidwall/gjson"
"net/http"
"testing"
"github.com/tidwall/gjson"
"github.com/photoprism/photoprism/internal/entity"
"github.com/stretchr/testify/assert"
)

View file

@ -1,10 +1,11 @@
package api
import (
"github.com/tidwall/gjson"
"net/http"
"testing"
"github.com/tidwall/gjson"
"github.com/stretchr/testify/assert"
)

View file

@ -1,10 +1,11 @@
package api
import (
"github.com/tidwall/gjson"
"net/http"
"testing"
"github.com/tidwall/gjson"
"github.com/stretchr/testify/assert"
)

View file

@ -1,11 +1,12 @@
package api
import (
"net/http"
"testing"
"github.com/photoprism/photoprism/internal/i18n"
"github.com/stretchr/testify/assert"
"github.com/tidwall/gjson"
"net/http"
"testing"
)
func TestCreateSession(t *testing.T) {

View file

@ -1,10 +1,11 @@
package api
import (
"github.com/stretchr/testify/assert"
"github.com/tidwall/gjson"
"net/http"
"testing"
"github.com/stretchr/testify/assert"
"github.com/tidwall/gjson"
)
func TestGetSettings(t *testing.T) {

View file

@ -1,9 +1,10 @@
package api
import (
"github.com/stretchr/testify/assert"
"net/http"
"testing"
"github.com/stretchr/testify/assert"
)
func TestGetShares(t *testing.T) {

View file

@ -1,10 +1,11 @@
package api
import (
"github.com/stretchr/testify/assert"
"github.com/tidwall/gjson"
"net/http"
"testing"
"github.com/stretchr/testify/assert"
"github.com/tidwall/gjson"
)
func TestGetStatus(t *testing.T) {

View file

@ -1,9 +1,10 @@
package api
import (
"github.com/stretchr/testify/assert"
"net/http"
"testing"
"github.com/stretchr/testify/assert"
)
func TestGetSvg(t *testing.T) {

View file

@ -1,9 +1,10 @@
package api
import (
"github.com/stretchr/testify/assert"
"net/http"
"testing"
"github.com/stretchr/testify/assert"
)
func TestUpload(t *testing.T) {

View file

@ -1,9 +1,10 @@
package api
import (
"github.com/stretchr/testify/assert"
"net/http"
"testing"
"github.com/stretchr/testify/assert"
)
func TestChangePassword(t *testing.T) {

View file

@ -1,9 +1,10 @@
package api
import (
"github.com/stretchr/testify/assert"
"net/http"
"testing"
"github.com/stretchr/testify/assert"
)
func TestGetVideo(t *testing.T) {

View file

@ -1,9 +1,10 @@
package api
import (
"github.com/stretchr/testify/assert"
"net/http"
"testing"
"github.com/stretchr/testify/assert"
)
func TestWebsocket(t *testing.T) {

View file

@ -1,10 +1,11 @@
package api
import (
"github.com/stretchr/testify/assert"
"github.com/tidwall/gjson"
"net/http"
"testing"
"github.com/stretchr/testify/assert"
"github.com/tidwall/gjson"
)
func TestCreateZip(t *testing.T) {

View file

@ -1,8 +1,9 @@
package config
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestConfig_PublicConfig(t *testing.T) {

View file

@ -1,9 +1,10 @@
package config
import (
"testing"
"github.com/photoprism/photoprism/pkg/rnd"
"github.com/stretchr/testify/assert"
"testing"
)
func TestConfig_FindExecutable(t *testing.T) {

View file

@ -1,9 +1,10 @@
package config
import (
"testing"
"github.com/photoprism/photoprism/internal/thumb"
"github.com/stretchr/testify/assert"
"testing"
)
func TestConfig_ConvertSize(t *testing.T) {

View file

@ -1,8 +1,9 @@
package config
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestConfig_HttpServerHost2(t *testing.T) {

View file

@ -1,9 +1,10 @@
package entity
import (
"testing"
"github.com/photoprism/photoprism/internal/form"
"github.com/stretchr/testify/assert"
"testing"
)
func TestCreateAccount(t *testing.T) {

View file

@ -1,8 +1,9 @@
package entity
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestAlbumMap_Get(t *testing.T) {

View file

@ -1,10 +1,11 @@
package entity
import (
"github.com/photoprism/photoprism/internal/form"
"testing"
"time"
"github.com/photoprism/photoprism/internal/form"
"github.com/gosimple/slug"
"github.com/photoprism/photoprism/pkg/txt"
"github.com/stretchr/testify/assert"

View file

@ -1,8 +1,9 @@
package entity
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestCameraMap_Get(t *testing.T) {

View file

@ -1,8 +1,9 @@
package entity
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestLocationMap_Get(t *testing.T) {

View file

@ -1,8 +1,9 @@
package entity
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestNewCountry(t *testing.T) {

View file

@ -1,8 +1,9 @@
package entity
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestDescriptionMap_Get(t *testing.T) {

View file

@ -1,9 +1,10 @@
package entity
import (
"github.com/stretchr/testify/assert"
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func TestFirstOrCreateDetails(t *testing.T) {

View file

@ -2,10 +2,11 @@ package entity
import (
"fmt"
"github.com/photoprism/photoprism/pkg/txt"
"strings"
"time"
"github.com/photoprism/photoprism/pkg/txt"
"github.com/gosimple/slug"
"github.com/jinzhu/gorm"
"github.com/photoprism/photoprism/pkg/fs"

View file

@ -1,8 +1,9 @@
package entity
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestFileShareMap_Get(t *testing.T) {

View file

@ -1,8 +1,9 @@
package entity
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestFileShare_TableName(t *testing.T) {

View file

@ -1,8 +1,9 @@
package entity
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestFileSyncMap_Get(t *testing.T) {

View file

@ -1,8 +1,9 @@
package entity
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestFileSync_TableName(t *testing.T) {

View file

@ -1,9 +1,10 @@
package entity
import (
"github.com/photoprism/photoprism/internal/form"
"testing"
"github.com/photoprism/photoprism/internal/form"
"github.com/stretchr/testify/assert"
)

View file

@ -1,8 +1,9 @@
package entity
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestKeywordMap_Get(t *testing.T) {

View file

@ -1,8 +1,9 @@
package entity
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestLabelMap_Get(t *testing.T) {

View file

@ -1,10 +1,11 @@
package entity
import (
"github.com/photoprism/photoprism/internal/classify"
"testing"
"time"
"github.com/photoprism/photoprism/internal/classify"
"github.com/stretchr/testify/assert"
)

View file

@ -1,8 +1,9 @@
package entity
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestLensMap_Get(t *testing.T) {

View file

@ -1,8 +1,9 @@
package entity
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestNewPassword(t *testing.T) {

View file

@ -1,8 +1,9 @@
package entity
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestPhotoAlbumMap_Get(t *testing.T) {

View file

@ -1,8 +1,9 @@
package entity
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestPhotoMap_Get(t *testing.T) {

View file

@ -1,9 +1,10 @@
package entity
import (
"github.com/stretchr/testify/assert"
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func TestPhoto_GetTimeZone(t *testing.T) {

View file

@ -1,8 +1,9 @@
package entity
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestPhoto_QualityScore(t *testing.T) {

View file

@ -1,10 +1,11 @@
package entity
import (
"github.com/stretchr/testify/assert"
"os"
"path/filepath"
"testing"
"github.com/stretchr/testify/assert"
)
func TestPhoto_Yaml(t *testing.T) {

View file

@ -1,8 +1,9 @@
package entity
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestPlaceMap_Get(t *testing.T) {

View file

@ -1,9 +1,10 @@
package entity
import (
"github.com/photoprism/photoprism/internal/acl"
"testing"
"github.com/photoprism/photoprism/internal/acl"
"github.com/stretchr/testify/assert"
)

View file

@ -1,9 +1,10 @@
package event
import (
"testing"
"github.com/leandro-lugaresi/hub"
"github.com/stretchr/testify/assert"
"testing"
)
func TestEntitiesUpdated(t *testing.T) {

View file

@ -1,8 +1,9 @@
package event
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestNewHook(t *testing.T) {

View file

@ -1,8 +1,9 @@
package form
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestNewAccount(t *testing.T) {

View file

@ -1,8 +1,9 @@
package form
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestNewAlbum(t *testing.T) {

View file

@ -1,8 +1,9 @@
package form
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestFeedback_Empty(t *testing.T) {

View file

@ -1,8 +1,9 @@
package form
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestNewFolder(t *testing.T) {

View file

@ -1,8 +1,9 @@
package form
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestLogin_HasToken(t *testing.T) {

View file

@ -1,9 +1,10 @@
package form
import (
"github.com/stretchr/testify/assert"
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func TestNewPhoto(t *testing.T) {

View file

@ -1,8 +1,9 @@
package form
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestSelection_Empty(t *testing.T) {

View file

@ -1,8 +1,9 @@
package meta
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestData_CodecAvc1(t *testing.T) {

View file

@ -1,9 +1,10 @@
package meta
import (
"github.com/stretchr/testify/assert"
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func TestData_AspectRatio(t *testing.T) {

View file

@ -8,9 +8,9 @@ import (
"github.com/dsoprea/go-exif/v3"
heicexif "github.com/dsoprea/go-heic-exif-extractor"
"github.com/dsoprea/go-jpeg-image-structure"
"github.com/dsoprea/go-png-image-structure"
"github.com/dsoprea/go-tiff-image-structure"
jpegstructure "github.com/dsoprea/go-jpeg-image-structure"
pngstructure "github.com/dsoprea/go-png-image-structure"
tiffstructure "github.com/dsoprea/go-tiff-image-structure"
"github.com/photoprism/photoprism/pkg/fs"
"github.com/photoprism/photoprism/pkg/txt"
)

View file

@ -1,8 +1,9 @@
package meta
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestGpsToLat(t *testing.T) {

View file

@ -1,9 +1,10 @@
package photoprism
import (
"testing"
"github.com/photoprism/photoprism/internal/config"
"github.com/stretchr/testify/assert"
"testing"
)
func TestFileName(t *testing.T) {

View file

@ -1,8 +1,9 @@
package photoprism
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestImportOptionsCopy(t *testing.T) {

View file

@ -1,11 +1,12 @@
package photoprism
import (
"github.com/photoprism/photoprism/internal/query"
"os"
"path"
"path/filepath"
"github.com/photoprism/photoprism/internal/query"
"github.com/photoprism/photoprism/internal/entity"
"github.com/photoprism/photoprism/internal/event"
"github.com/photoprism/photoprism/pkg/fs"

View file

@ -1,11 +1,12 @@
package photoprism
import (
"testing"
"github.com/photoprism/photoprism/internal/classify"
"github.com/photoprism/photoprism/internal/config"
"github.com/photoprism/photoprism/internal/nsfw"
"github.com/stretchr/testify/assert"
"testing"
)
func TestIndex_MediaFile(t *testing.T) {

View file

@ -1,9 +1,10 @@
package photoprism
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
"github.com/photoprism/photoprism/internal/classify"
"github.com/photoprism/photoprism/internal/config"
"github.com/photoprism/photoprism/internal/nsfw"

View file

@ -1,8 +1,9 @@
package pro
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestConfig_MapKey(t *testing.T) {

View file

@ -1,9 +1,10 @@
package pro
import (
"testing"
"github.com/photoprism/photoprism/internal/form"
"github.com/stretchr/testify/assert"
"testing"
)
func TestNewFeedback(t *testing.T) {

View file

@ -1,9 +1,10 @@
package pro
import (
"github.com/stretchr/testify/assert"
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func TestSession_Expired(t *testing.T) {

View file

@ -1,10 +1,11 @@
package query
import (
"testing"
"github.com/photoprism/photoprism/internal/entity"
"github.com/photoprism/photoprism/internal/form"
"github.com/stretchr/testify/assert"
"testing"
)
func TestAccounts(t *testing.T) {

View file

@ -1,8 +1,9 @@
package query
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestCounts_Refresh(t *testing.T) {

View file

@ -1,8 +1,9 @@
package query
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestErrors(t *testing.T) {

View file

@ -1,10 +1,11 @@
package query
import (
"github.com/photoprism/photoprism/internal/entity"
"github.com/stretchr/testify/assert"
"testing"
"time"
"github.com/photoprism/photoprism/internal/entity"
"github.com/stretchr/testify/assert"
)
func TestFileShares(t *testing.T) {

View file

@ -1,8 +1,9 @@
package query
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestSetDownloadFileID(t *testing.T) {

View file

@ -1,9 +1,10 @@
package query
import (
"testing"
"github.com/photoprism/photoprism/internal/entity"
"github.com/stretchr/testify/assert"
"testing"
)
func TestFileSyncs(t *testing.T) {

View file

@ -1,9 +1,10 @@
package query
import (
"github.com/stretchr/testify/assert"
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func TestGeoResult_Lat(t *testing.T) {

View file

@ -1,10 +1,11 @@
package query
import (
"testing"
"github.com/photoprism/photoprism/internal/entity"
"github.com/photoprism/photoprism/internal/form"
"github.com/stretchr/testify/assert"
"testing"
)
func TestLabels(t *testing.T) {

View file

@ -1,9 +1,10 @@
package query
import (
"github.com/stretchr/testify/assert"
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func TestPhotosResults_Merged(t *testing.T) {

View file

@ -1,9 +1,10 @@
package query
import (
"github.com/photoprism/photoprism/internal/entity"
"testing"
"github.com/photoprism/photoprism/internal/entity"
"github.com/stretchr/testify/assert"
"github.com/photoprism/photoprism/internal/form"

View file

@ -1,9 +1,10 @@
package query
import (
"github.com/photoprism/photoprism/internal/entity"
"testing"
"github.com/photoprism/photoprism/internal/entity"
"github.com/stretchr/testify/assert"
)

View file

@ -1,8 +1,9 @@
package session
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestUIDs_String(t *testing.T) {

View file

@ -1,9 +1,10 @@
package workers
import (
"github.com/photoprism/photoprism/internal/mutex"
"testing"
"github.com/photoprism/photoprism/internal/mutex"
"github.com/photoprism/photoprism/internal/config"
"github.com/stretchr/testify/assert"
)

View file

@ -1,10 +1,11 @@
package workers
import (
"github.com/photoprism/photoprism/internal/entity"
"strings"
"testing"
"github.com/photoprism/photoprism/internal/entity"
"github.com/photoprism/photoprism/internal/config"
"github.com/stretchr/testify/assert"
)

View file

@ -1,9 +1,10 @@
package workers
import (
"github.com/photoprism/photoprism/internal/mutex"
"testing"
"github.com/photoprism/photoprism/internal/mutex"
"github.com/photoprism/photoprism/internal/config"
"github.com/stretchr/testify/assert"
)

View file

@ -1,10 +1,11 @@
package colors
import (
"github.com/lucasb-eyer/go-colorful"
"github.com/stretchr/testify/assert"
"image/color"
"testing"
"github.com/lucasb-eyer/go-colorful"
"github.com/stretchr/testify/assert"
)
func TestColorful(t *testing.T) {

View file

@ -1,8 +1,9 @@
package colors
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestColors_List(t *testing.T) {

View file

@ -1,9 +1,10 @@
package colors
import (
"github.com/stretchr/testify/assert"
"strconv"
"testing"
"github.com/stretchr/testify/assert"
)
func TestLightMap_Hex(t *testing.T) {

View file

@ -1,8 +1,9 @@
package colors
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestLuminance_Hex(t *testing.T) {

View file

@ -1,8 +1,9 @@
package txt
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestSlugToTitle(t *testing.T) {