diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-27 03:04:03 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-27 03:04:03 +0800 |
commit | 62ebf999bf71ef05e34e234b6e07cc31188970b7 (patch) | |
tree | 739d2b662ebe945e1f1a2f00fd9619fc2a6fb7d1 /rpc/args.go | |
parent | e21ce9a9b48a651a704a92369712c17113d92ad6 (diff) | |
download | go-tangerine-62ebf999bf71ef05e34e234b6e07cc31188970b7.tar go-tangerine-62ebf999bf71ef05e34e234b6e07cc31188970b7.tar.gz go-tangerine-62ebf999bf71ef05e34e234b6e07cc31188970b7.tar.bz2 go-tangerine-62ebf999bf71ef05e34e234b6e07cc31188970b7.tar.lz go-tangerine-62ebf999bf71ef05e34e234b6e07cc31188970b7.tar.xz go-tangerine-62ebf999bf71ef05e34e234b6e07cc31188970b7.tar.zst go-tangerine-62ebf999bf71ef05e34e234b6e07cc31188970b7.zip |
FilterStringArgs tests
Diffstat (limited to 'rpc/args.go')
-rw-r--r-- | rpc/args.go | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/rpc/args.go b/rpc/args.go index 459c6546b..96188d02e 100644 --- a/rpc/args.go +++ b/rpc/args.go @@ -649,18 +649,13 @@ func (args *FilterStringArgs) UnmarshalJSON(b []byte) (err error) { if !ok { return NewInvalidTypeError("filter", "not a string") } - args.Word = argstr - - return nil -} - -func (args *FilterStringArgs) requirements() error { - switch args.Word { + switch argstr { case "latest", "pending": break default: return NewValidationError("Word", "Must be `latest` or `pending`") } + args.Word = argstr return nil } |