Skip to content

Commit

Permalink
refactor(lint/unconvert): remove base64 call returns a string (#717)
Browse files Browse the repository at this point in the history
* refactor(lint/unconvert): remove base64 call returns a string

* chore(nats): fix comment on exported function

* fix(addsvc): dsl.Request requires an StringMatcher as path
  • Loading branch information
mishudark authored and peterbourgon committed Jul 17, 2018
1 parent af6ec36 commit af73865
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tracing/opentracing/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ type metadataReaderWriter struct {
func (w metadataReaderWriter) Set(key, val string) {
key = strings.ToLower(key)
if strings.HasSuffix(key, "-bin") {
val = string(base64.StdEncoding.EncodeToString([]byte(val)))
val = base64.StdEncoding.EncodeToString([]byte(val))
}
(*w.MD)[key] = append((*w.MD)[key], val)
}
Expand Down
3 changes: 1 addition & 2 deletions transport/grpc/request_response_funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ func SetResponseTrailer(key, val string) ServerResponseFunc {
func EncodeKeyValue(key, val string) (string, string) {
key = strings.ToLower(key)
if strings.HasSuffix(key, binHdrSuffix) {
v := base64.StdEncoding.EncodeToString([]byte(val))
val = string(v)
val = base64.StdEncoding.EncodeToString([]byte(val))
}
return key, val
}
Expand Down
2 changes: 1 addition & 1 deletion transport/nats/publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type Publisher struct {
timeout time.Duration
}

// NewClient constructs a usable Publisher for a single remote method.
// NewPublisher constructs a usable Publisher for a single remote method.
func NewPublisher(
publisher *nats.Conn,
subject string,
Expand Down

0 comments on commit af73865

Please sign in to comment.