Skip to content

Commit

Permalink
Remove unused globals (#367)
Browse files Browse the repository at this point in the history
The _bufSize and maxUint64 globals were unused, so this PR removes them.
  • Loading branch information
skipor authored and akshayjshah committed Mar 13, 2017
1 parent 00cc7bd commit b997dbc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
6 changes: 0 additions & 6 deletions field_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ package zap

import (
"errors"
"math"
"net"
"sync"
"testing"
Expand All @@ -32,11 +31,6 @@ import (
"go.uber.org/zap/zapcore"
)

var (
// Compiler complains about constants overflowing, so store this in a variable.
maxUint64 = uint64(math.MaxUint64)
)

type username string

func (n username) MarshalLogObject(enc zapcore.ObjectEncoder) error {
Expand Down
8 changes: 2 additions & 6 deletions zapcore/json_encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,8 @@ import (
"go.uber.org/zap/internal/bufferpool"
)

const (
// For JSON-escaping; see jsonEncoder.safeAddString below.
_hex = "0123456789abcdef"
// Initial buffer size for encoders.
_initialBufSize = 1024
)
// For JSON-escaping; see jsonEncoder.safeAddString below.
const _hex = "0123456789abcdef"

var _jsonPool = sync.Pool{New: func() interface{} {
return &jsonEncoder{}
Expand Down

0 comments on commit b997dbc

Please sign in to comment.