diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2021-07-06 01:25:45 +0200 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2021-07-06 01:25:45 +0200 |
commit | 15790f0be8af9b9cfe79d5de338d39cd164188c1 (patch) | |
tree | bf0881a2dd34c9c23beaa645808d5ead737c6441 | |
parent | 5701de3937ae3b4f210be957830e623afce83adc (diff) | |
download | refcat-15790f0be8af9b9cfe79d5de338d39cd164188c1.tar.gz refcat-15790f0be8af9b9cfe79d5de338d39cd164188c1.zip |
util: cleanup encoder
-rw-r--r-- | skate/xio/util.go | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/skate/xio/util.go b/skate/xio/util.go index 9f6cc26..49f38a3 100644 --- a/skate/xio/util.go +++ b/skate/xio/util.go @@ -9,25 +9,6 @@ import ( "sync" ) -type Encoder interface { - Encode(interface{}) error -} - -type SafeEncoder struct { - sync.Mutex - enc Encoder -} - -func NewSafeEncoder(enc Encoder) *SafeEncoder { - return &SafeEncoder{enc: enc} -} - -func (s *SafeEncoder) Encode(v interface{}) error { - s.Lock() - defer s.Unlock() - return s.enc.Encode(v) -} - // SingleWriter makes any writer thread safe. type SingleWriter struct { sync.Mutex |