running go fmt over repos

This commit is contained in:
Saxon Nelson-Milton 2020-12-17 21:38:10 +10:30
parent 528733c559
commit 27c90ad852
4 changed files with 8 additions and 8 deletions

View File

@ -2,7 +2,7 @@
DESCRIPTION DESCRIPTION
tests.go contains JPEG/RTP packets use for testing in jpeg_test.go. 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 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 AUTHOR
Saxon Nelson-Milton <saxon@ausocean.org> Saxon Nelson-Milton <saxon@ausocean.org>

View File

@ -81,8 +81,8 @@ type Object struct {
// Number, string types use String and arrays and objects use // Number, string types use String and arrays and objects use
// Object. The Name is optional. // Object. The Name is optional.
type Property struct { type Property struct {
Type uint8 Type uint8
Name string Name string
Number float64 Number float64
String string String string

View File

@ -50,7 +50,7 @@ func NewClient(addr string) (c *Client, local, remote *net.TCPAddr, err error) {
c = &Client{addr: addr} c = &Client{addr: addr}
c.url, err = url.Parse(addr) c.url, err = url.Parse(addr)
if err != nil { if err != nil {
return nil, nil,nil, err return nil, nil, nil, err
} }
c.conn, err = net.Dial("tcp", c.url.Host) c.conn, err = net.Dial("tcp", c.url.Host)
if err != nil { if err != nil {

View File

@ -69,7 +69,7 @@ func (r *Revid) reset(c config.Config) error {
r.cfg.Logger.Log(logger.Debug, "setting config") r.cfg.Logger.Log(logger.Debug, "setting config")
err := r.setConfig(c) err := r.setConfig(c)
if err != nil { 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") 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)) encOptions = append(encOptions, mts.TimeBasedPSI(time.Duration(r.cfg.PSITime)*time.Second))
r.cfg.CBR = true r.cfg.CBR = true
case codecutil.PCM, codecutil.ADPCM: 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: default:
panic("unknown input codec") 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") r.cfg.Logger.Log(logger.Info, "finished setting pipeline")
if err != nil { 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 return nil
@ -282,7 +282,7 @@ func (r *Revid) setupPipeline(mtsEnc func(dst io.WriteCloser, rate float64) (io.
err = r.setupAudio() err = r.setupAudio()
} }
if err != nil { 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 // Configure the input device. We know that defaults are set, so no need to