Remove YAML/MD lint configs, reformat stdlib imports

This commit is contained in:
Lawrence, Rendall
2022-04-12 18:10:51 +03:00
parent ec49168db9
commit c1956d68f6
28 changed files with 57 additions and 49 deletions
+2 -1
View File
@@ -1,8 +1,9 @@
package clientapproval
import (
"github.com/sot-tech/mochi/bittorrent"
"testing"
"github.com/sot-tech/mochi/bittorrent"
)
func TestClientID(t *testing.T) {
@@ -6,6 +6,7 @@ import (
"context"
"errors"
"fmt"
"github.com/sot-tech/mochi/bittorrent"
"github.com/sot-tech/mochi/middleware"
"github.com/sot-tech/mochi/storage"
@@ -3,9 +3,10 @@ package clientapproval
import (
"context"
"fmt"
"testing"
"github.com/sot-tech/mochi/bittorrent"
"github.com/stretchr/testify/require"
"testing"
)
var cases = []struct {
+1
View File
@@ -3,6 +3,7 @@ package middleware
import (
"context"
"errors"
"github.com/sot-tech/mochi/bittorrent"
"github.com/sot-tech/mochi/storage"
)
+4 -3
View File
@@ -13,6 +13,10 @@ import (
"encoding/json"
"errors"
"fmt"
"net/http"
"strings"
"time"
jc "github.com/SermoDigital/jose/crypto"
"github.com/SermoDigital/jose/jws"
"github.com/SermoDigital/jose/jwt"
@@ -23,9 +27,6 @@ import (
"github.com/sot-tech/mochi/pkg/stop"
"github.com/sot-tech/mochi/storage"
"gopkg.in/yaml.v3"
"net/http"
"strings"
"time"
)
// Name is the name by which this middleware is registered with Conf.
+2 -1
View File
@@ -2,12 +2,13 @@ package middleware
import (
"context"
"time"
"github.com/sot-tech/mochi/bittorrent"
"github.com/sot-tech/mochi/frontend"
"github.com/sot-tech/mochi/pkg/log"
"github.com/sot-tech/mochi/pkg/stop"
"github.com/sot-tech/mochi/storage"
"time"
)
// ResponseConfig holds the configuration used for the actual response.
+2 -1
View File
@@ -4,9 +4,10 @@ package middleware
import (
"errors"
"sync"
"github.com/sot-tech/mochi/storage"
"gopkg.in/yaml.v3"
"sync"
)
var (
+3 -2
View File
@@ -1,10 +1,11 @@
package random
import (
_ "github.com/sot-tech/mochi/pkg/rand_seed"
"github.com/stretchr/testify/require"
"math/rand"
"testing"
_ "github.com/sot-tech/mochi/pkg/rand_seed"
"github.com/stretchr/testify/require"
)
func TestIntn(t *testing.T) {
@@ -2,9 +2,10 @@ package container
import (
"errors"
"sync"
"github.com/sot-tech/mochi/bittorrent"
"github.com/sot-tech/mochi/storage"
"sync"
)
// DefaultStorageCtxName default ctx name if value from configuration is not set
@@ -6,6 +6,7 @@ package directory
import (
"fmt"
"github.com/anacrolix/torrent/metainfo"
"github.com/anacrolix/torrent/util/dirwatch"
"github.com/minio/sha256-simd"
@@ -4,6 +4,7 @@ package list
import (
"fmt"
"github.com/sot-tech/mochi/bittorrent"
"github.com/sot-tech/mochi/middleware/torrentapproval/container"
"github.com/sot-tech/mochi/pkg/log"
@@ -5,6 +5,7 @@ package torrentapproval
import (
"context"
"fmt"
"github.com/sot-tech/mochi/bittorrent"
"github.com/sot-tech/mochi/middleware"
"github.com/sot-tech/mochi/middleware/torrentapproval/container"
@@ -3,11 +3,12 @@ package torrentapproval
import (
"context"
"fmt"
"testing"
"github.com/sot-tech/mochi/bittorrent"
"github.com/sot-tech/mochi/storage/memory"
"github.com/stretchr/testify/require"
"gopkg.in/yaml.v3"
"testing"
)
var cases = []struct {
+3 -2
View File
@@ -4,13 +4,14 @@ import (
"context"
"errors"
"fmt"
"sync"
"time"
"github.com/sot-tech/mochi/bittorrent"
"github.com/sot-tech/mochi/middleware"
"github.com/sot-tech/mochi/middleware/pkg/random"
"github.com/sot-tech/mochi/storage"
"gopkg.in/yaml.v3"
"sync"
"time"
)
// Name is the name by which this middleware is registered with Conf.
+2 -1
View File
@@ -3,9 +3,10 @@ package varinterval
import (
"context"
"fmt"
"testing"
"github.com/sot-tech/mochi/bittorrent"
"github.com/stretchr/testify/require"
"testing"
)
var configTests = []struct {