gometalinter -> golangci-lint migration (#3933)
{,scripts/}Makefile:
- Remove gometalinter, install golangci-lint.
- Remove distinction between tools and devtools.
Just tools is enough.
- test_lint -> lint
Migrating away from underscore separated names.
- Remove unnecessary targets.
- Drop tendermint/lint. Incompatbile with golangci-lint
and no longer necessary anyway.
- Fix misleading message in go-mod-cache.
- New ci-target to avoid download tools twice.
- Run tests with -mod=readonly.
Port tools/gometalinter.json to .golangci.yml
Update CircleCI config accordingly.
Closes: #3896
This commit is contained in:
@@ -11,6 +11,17 @@ type AddNewKey struct {
|
||||
Index int `json:"index,string,omitempty"`
|
||||
}
|
||||
|
||||
// NewAddNewKey constructs a new AddNewKey request structure.
|
||||
func NewAddNewKey(name, password, mnemonic string, account, index int) AddNewKey {
|
||||
return AddNewKey{
|
||||
Name: name,
|
||||
Password: password,
|
||||
Mnemonic: mnemonic,
|
||||
Account: account,
|
||||
Index: index,
|
||||
}
|
||||
}
|
||||
|
||||
// RecoverKeyBody recovers a key
|
||||
type RecoverKey struct {
|
||||
Password string `json:"password"`
|
||||
@@ -19,13 +30,26 @@ type RecoverKey struct {
|
||||
Index int `json:"index,string,omitempty"`
|
||||
}
|
||||
|
||||
// NewRecoverKey constructs a new RecoverKey request structure.
|
||||
func NewRecoverKey(password, mnemonic string, account, index int) RecoverKey {
|
||||
return RecoverKey{Password: password, Mnemonic: mnemonic, Account: account, Index: index}
|
||||
}
|
||||
|
||||
// UpdateKeyReq requests updating a key
|
||||
type UpdateKeyReq struct {
|
||||
OldPassword string `json:"old_password"`
|
||||
NewPassword string `json:"new_password"`
|
||||
}
|
||||
|
||||
// NewUpdateKeyReq constructs a new UpdateKeyReq structure.
|
||||
func NewUpdateKeyReq(old, new string) UpdateKeyReq {
|
||||
return UpdateKeyReq{OldPassword: old, NewPassword: new}
|
||||
}
|
||||
|
||||
// DeleteKeyReq requests deleting a key
|
||||
type DeleteKeyReq struct {
|
||||
Password string `json:"password"`
|
||||
}
|
||||
|
||||
// NewDeleteKeyReq constructs a new DeleteKeyReq structure.
|
||||
func NewDeleteKeyReq(password string) DeleteKeyReq { return DeleteKeyReq{Password: password} }
|
||||
|
||||
Reference in New Issue
Block a user