Hide DecoderFunc

Since DecoderFunc is not being used as a public API, there's no need
to increase the API surface area.
This commit is contained in:
Lukas Herman
2020-09-05 19:57:00 -07:00
parent 86e3a3f14c
commit 366885e01c
2 changed files with 3 additions and 3 deletions

View File

@@ -5,7 +5,7 @@ import (
)
func NewDecoder(f Format) (Decoder, error) {
var decoder DecoderFunc
var decoder decoderFunc
switch f {
case FormatI420:

View File

@@ -7,8 +7,8 @@ type Decoder interface {
}
// DecoderFunc is a proxy type for Decoder
type DecoderFunc func(frame []byte, width, height int) (image.Image, error)
type decoderFunc func(frame []byte, width, height int) (image.Image, error)
func (f DecoderFunc) Decode(frame []byte, width, height int) (image.Image, error) {
func (f decoderFunc) Decode(frame []byte, width, height int) (image.Image, error) {
return f(frame, width, height)
}