format with gofumports
This commit is contained in:
@@ -12,9 +12,7 @@ import (
|
||||
"github.com/sentriz/gonic/scanner"
|
||||
)
|
||||
|
||||
const (
|
||||
programName = "gonicscan"
|
||||
)
|
||||
const programName = "gonicscan"
|
||||
|
||||
func main() {
|
||||
set := flag.NewFlagSet(programName, flag.ExitOnError)
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
import "time"
|
||||
|
||||
type CrudBase struct {
|
||||
CreatedAt time.Time
|
||||
|
||||
@@ -19,9 +19,7 @@ import (
|
||||
"github.com/sentriz/gonic/scanner/tags"
|
||||
)
|
||||
|
||||
var (
|
||||
IsScanning int32
|
||||
)
|
||||
var IsScanning int32
|
||||
|
||||
var coverFilenames = map[string]struct{}{
|
||||
"cover.png": {},
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
import "testing"
|
||||
|
||||
func TestFirstExisting(t *testing.T) {
|
||||
cases := []struct {
|
||||
@@ -11,15 +9,21 @@ func TestFirstExisting(t *testing.T) {
|
||||
or string
|
||||
exp string
|
||||
}{
|
||||
{"none present",
|
||||
{
|
||||
"none present",
|
||||
[]string{"one", "two", "three"}, "default",
|
||||
"one"},
|
||||
{"first missing",
|
||||
"one",
|
||||
},
|
||||
{
|
||||
"first missing",
|
||||
[]string{"", "two", "three"}, "default",
|
||||
"two"},
|
||||
{"all missing",
|
||||
"two",
|
||||
},
|
||||
{
|
||||
"all missing",
|
||||
[]string{"", "", ""}, "default",
|
||||
"default"},
|
||||
"default",
|
||||
},
|
||||
}
|
||||
for _, tc := range cases {
|
||||
tc := tc // pin
|
||||
|
||||
@@ -9,11 +9,9 @@ import (
|
||||
"net/url"
|
||||
)
|
||||
|
||||
var (
|
||||
requiredParameters = []string{
|
||||
var requiredParameters = []string{
|
||||
"u", "v", "c",
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
func checkHasAllParams(params url.Values) error {
|
||||
for _, req := range requiredParameters {
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package subsonic
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
import "time"
|
||||
|
||||
var (
|
||||
apiVersion = "1.9.0"
|
||||
|
||||
Reference in New Issue
Block a user