X-Git-Url: https://git.korewanetadesu.com/?p=go-signalcontext.git;a=blobdiff_plain;f=error.go;h=3ca599e26806b7b3a21f659bd14424cfab29a73d;hp=c0a4f9724a3f7eebc2996a3284733aef5236348f;hb=refs%2Fheads%2Fmaster;hpb=8cf685c73e37c718d1dcfe057caad080196f3e18 diff --git a/error.go b/error.go index c0a4f97..3ca599e 100644 --- a/error.go +++ b/error.go @@ -1,12 +1,12 @@ package signalcontext import ( - "fmt" "os" ) // A Error will be returned by a SignalContext’s Err() method when it -// was finished due to a signal (rather than e.g. parent cancellation). +// canceled due to an operating system signal (rather than e.g. parent +// cancellation). type Error struct { os.Signal } @@ -16,5 +16,5 @@ func (e Error) Error() string { } func (e Error) String() string { - return fmt.Sprintf("received signal: %s", e.Signal) + return "received signal: " + e.Signal.String() }