From 96c15ec0b7da3373bad666f95e81e66c6fad0a9b Mon Sep 17 00:00:00 2001 From: Norbert Dzikowski Date: Tue, 22 Sep 2020 15:33:19 +0200 Subject: [PATCH] :rotating_light: Fix linter warnings Signed-off-by: Norbert Dzikowski --- channel/allocation.go | 2 +- channel/errors.go | 6 +++--- channel/machine.go | 4 ++-- client/test/channel.go | 2 +- log/levellified.go | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/channel/allocation.go b/channel/allocation.go index 7471ec80..92fb60f7 100644 --- a/channel/allocation.go +++ b/channel/allocation.go @@ -76,7 +76,7 @@ type ( Bals []Bal } - // Bal is a single asset's balance + // Bal is a single asset's balance. Bal = *big.Int // Asset identifies an asset. E.g., it may be the address of the multi-sig diff --git a/channel/errors.go b/channel/errors.go index 180b58bc..6d6809e0 100644 --- a/channel/errors.go +++ b/channel/errors.go @@ -21,18 +21,18 @@ import ( ) type ( - // StateTransitionError happens in case of an invalid channel state transition + // StateTransitionError happens in case of an invalid channel state transition. StateTransitionError struct { ID ID } - // ActionError happens if an invalid action is applied to a channel state + // ActionError happens if an invalid action is applied to a channel state. ActionError struct { ID ID } // PhaseTransitionError happens in case of an invalid channel machine phase - // transition + // transition. PhaseTransitionError struct { ID ID current Phase diff --git a/channel/machine.go b/channel/machine.go index 48a335fb..b7351d11 100644 --- a/channel/machine.go +++ b/channel/machine.go @@ -29,10 +29,10 @@ import ( type Index = uint16 type ( - // Phase is a phase of the channel pushdown automaton + // Phase is a phase of the channel pushdown automaton. Phase uint8 - // PhaseTransition represents a transition between two phases + // PhaseTransition represents a transition between two phases. PhaseTransition struct { From, To Phase } diff --git a/client/test/channel.go b/client/test/channel.go index 53d0599f..0f782160 100644 --- a/client/test/channel.go +++ b/client/test/channel.go @@ -41,7 +41,7 @@ type ( bals []channel.Bal // independent tracking of channel balance for testing } - // A handlerRes encapsulates the result of a channel handling request + // A handlerRes encapsulates the result of a channel handling request. handlerRes struct { up client.ChannelUpdate err error diff --git a/log/levellified.go b/log/levellified.go index 6e780631..1fa57e1e 100644 --- a/log/levellified.go +++ b/log/levellified.go @@ -41,7 +41,7 @@ const ( // os.Exit(1) or similar. It it the highest level of severity. FatalLevel Level = iota - defaultLogLevelShift // -3: default level WarnLevel // PanicLevel calls the wrapped logger's Panic method with the prefix "[panic]". - // The wrapped logger should usually call panic with the given message + // The wrapped logger should usually call panic with the given message. PanicLevel // ErrorLevel calls the wrapped logger's Print method with the prefix "[error]". ErrorLevel