From 27c90ad8527ee5c357af74c61881e7abee25aff1 Mon Sep 17 00:00:00 2001 From: Saxon Nelson-Milton Date: Thu, 17 Dec 2020 21:38:10 +1030 Subject: [PATCH] running go fmt over repos --- codec/mjpeg/tests.go | 2 +- protocol/rtmp/amf/amf.go | 4 ++-- protocol/rtsp/client.go | 2 +- revid/pipeline.go | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/codec/mjpeg/tests.go b/codec/mjpeg/tests.go index 4331623b..fa39200c 100644 --- a/codec/mjpeg/tests.go +++ b/codec/mjpeg/tests.go @@ -2,7 +2,7 @@ DESCRIPTION tests.go contains JPEG/RTP packets use for testing in jpeg_test.go. These are from a known good source from which the expected MJPEG file - found in testdata/expect.mjpeg is derived. + found in testdata/expect.mjpeg is derived. AUTHOR Saxon Nelson-Milton diff --git a/protocol/rtmp/amf/amf.go b/protocol/rtmp/amf/amf.go index 7ccfd932..02a9d005 100644 --- a/protocol/rtmp/amf/amf.go +++ b/protocol/rtmp/amf/amf.go @@ -81,8 +81,8 @@ type Object struct { // Number, string types use String and arrays and objects use // Object. The Name is optional. type Property struct { - Type uint8 - + Type uint8 + Name string Number float64 String string diff --git a/protocol/rtsp/client.go b/protocol/rtsp/client.go index f6c9d0eb..8a7598da 100644 --- a/protocol/rtsp/client.go +++ b/protocol/rtsp/client.go @@ -50,7 +50,7 @@ func NewClient(addr string) (c *Client, local, remote *net.TCPAddr, err error) { c = &Client{addr: addr} c.url, err = url.Parse(addr) if err != nil { - return nil, nil,nil, err + return nil, nil, nil, err } c.conn, err = net.Dial("tcp", c.url.Host) if err != nil { diff --git a/revid/pipeline.go b/revid/pipeline.go index 7d770a42..7f19067f 100644 --- a/revid/pipeline.go +++ b/revid/pipeline.go @@ -69,7 +69,7 @@ func (r *Revid) reset(c config.Config) error { r.cfg.Logger.Log(logger.Debug, "setting config") err := r.setConfig(c) if err != nil { - return fmt.Errorf("could not set config: %w",err) + return fmt.Errorf("could not set config: %w", err) } r.cfg.Logger.Log(logger.Info, "config set") @@ -95,7 +95,7 @@ func (r *Revid) reset(c config.Config) error { encOptions = append(encOptions, mts.TimeBasedPSI(time.Duration(r.cfg.PSITime)*time.Second)) r.cfg.CBR = true case codecutil.PCM, codecutil.ADPCM: - return nil, errors.New(fmt.Sprintf("invalid input codec: %v for input: %v",r.cfg.InputCodec,r.cfg.Input)) + return nil, errors.New(fmt.Sprintf("invalid input codec: %v for input: %v", r.cfg.InputCodec, r.cfg.Input)) default: panic("unknown input codec") } @@ -117,7 +117,7 @@ func (r *Revid) reset(c config.Config) error { r.cfg.Logger.Log(logger.Info, "finished setting pipeline") if err != nil { - return fmt.Errorf("could not set up pipeline: %w",err) + return fmt.Errorf("could not set up pipeline: %w", err) } return nil @@ -282,7 +282,7 @@ func (r *Revid) setupPipeline(mtsEnc func(dst io.WriteCloser, rate float64) (io. err = r.setupAudio() } if err != nil { - return fmt.Errorf("could not set lexer: %w",err) + return fmt.Errorf("could not set lexer: %w", err) } // Configure the input device. We know that defaults are set, so no need to