Reformat code

This commit is contained in:
Širhoe Biazhkovič
2021-11-27 00:33:13 +03:00
committed by Lawrence, Rendall
parent 360ac9d08d
commit 04f1a9efb9
4 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -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
+3 -3
View File
@@ -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
View File
@@ -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
}