mirror of
https://github.com/sot-tech/mochi.git
synced 2026-06-11 07:23:30 -07:00
Reformat code
This commit is contained in:
committed by
Lawrence, Rendall
parent
360ac9d08d
commit
04f1a9efb9
@@ -24,8 +24,8 @@ jobs:
|
||||
run: go build -v ./cmd/...
|
||||
- name: Vet
|
||||
run: go vet ./...
|
||||
# - name: Imports
|
||||
# uses: Jerome1337/goimports-action@v1.0.3
|
||||
# - name: Imports
|
||||
# uses: Jerome1337/goimports-action@v1.0.3
|
||||
- name: Format
|
||||
uses: Jerome1337/gofmt-action@v1.0.4
|
||||
- name: Lint
|
||||
|
||||
@@ -50,11 +50,11 @@ type InfoHash string
|
||||
|
||||
const (
|
||||
// InfoHashV1Len is the same as sha1.Size
|
||||
InfoHashV1Len = sha1.Size
|
||||
InfoHashV1Len = sha1.Size
|
||||
// InfoHashV2Len ... sha256.Size
|
||||
InfoHashV2Len = sha256.Size
|
||||
InfoHashV2Len = sha256.Size
|
||||
// NoneInfoHash dummy invalid InfoHash
|
||||
NoneInfoHash InfoHash = ""
|
||||
NoneInfoHash InfoHash = ""
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//go:build e2e
|
||||
//+build e2e
|
||||
// +build e2e
|
||||
|
||||
package main
|
||||
|
||||
|
||||
@@ -21,12 +21,12 @@ func init() {
|
||||
// Config - implementation of list container configuration.
|
||||
type Config struct {
|
||||
// HashList static list of HEX-encoded InfoHashes.
|
||||
HashList []string `yaml:"hash_list"`
|
||||
HashList []string `yaml:"hash_list"`
|
||||
// If Invert set to true, all InfoHashes stored in HashList should be blacklisted.
|
||||
Invert bool `yaml:"invert"`
|
||||
Invert bool `yaml:"invert"`
|
||||
// StorageCtx is the name of storage context where to store hash list.
|
||||
// It might be table name, REDIS record key or something else, depending on storage.
|
||||
StorageCtx string `yaml:"storage_ctx"`
|
||||
StorageCtx string `yaml:"storage_ctx"`
|
||||
}
|
||||
|
||||
// DUMMY used as value placeholder if storage needs some value with
|
||||
@@ -68,9 +68,9 @@ func build(confBytes []byte, st storage.Storage) (container.Container, error) {
|
||||
// List work structure of hash list. Might be reused in another containers.
|
||||
type List struct {
|
||||
// Invert see Config.Invert description.
|
||||
Invert bool
|
||||
Invert bool
|
||||
// Storage implementation where hashes are stored for approval checks.
|
||||
Storage storage.Storage
|
||||
Storage storage.Storage
|
||||
// StorageCtx see Config.StorageCtx description.
|
||||
StorageCtx string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user