Skip to content

Commit

Permalink
Log parsing errors using log pkg (#851)
Browse files Browse the repository at this point in the history
* Log parsing errors using log pkg.

* Run goimport.
  • Loading branch information
dilyevsky authored and neild committed May 17, 2019
1 parent e91709a commit b285ee9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions proto/properties.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ package proto
import (
"fmt"
"log"
"os"
"reflect"
"sort"
"strconv"
Expand Down Expand Up @@ -194,7 +193,7 @@ func (p *Properties) Parse(s string) {
// "bytes,49,opt,name=foo,def=hello!"
fields := strings.Split(s, ",") // breaks def=, but handled below.
if len(fields) < 2 {
fmt.Fprintf(os.Stderr, "proto: tag has too few fields: %q\n", s)
log.Printf("proto: tag has too few fields: %q", s)
return
}

Expand All @@ -214,7 +213,7 @@ func (p *Properties) Parse(s string) {
p.WireType = WireBytes
// no numeric converter for non-numeric types
default:
fmt.Fprintf(os.Stderr, "proto: tag has unknown wire type: %q\n", s)
log.Printf("proto: tag has unknown wire type: %q", s)
return
}

Expand Down

0 comments on commit b285ee9

Please sign in to comment.