Skip to content

Commit

Permalink
more dead code removed
Browse files Browse the repository at this point in the history
  • Loading branch information
or-else committed Feb 1, 2019
1 parent 6a4180e commit ede3d8c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 34 deletions.
16 changes: 0 additions & 16 deletions server/pbconverter.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,22 +438,6 @@ func bytesToInterface(in []byte) interface{} {
return out
}

func intSliceToInt32(in []int) []int32 {
out := make([]int32, len(in))
for i, v := range in {
out[i] = int32(v)
}
return out
}

func int32SliceToInt(in []int32) []int {
out := make([]int, len(in))
for i, v := range in {
out[i] = int(v)
}
return out
}

func timeToInt64(ts *time.Time) int64 {
if ts != nil {
return ts.UnixNano() / int64(time.Millisecond)
Expand Down
18 changes: 0 additions & 18 deletions server/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,6 @@ func delrangeDeserialize(in []types.Range) []MsgDelRange {
return out
}

func delrangeSerialize(in []MsgDelRange) []types.Range {
if len(in) == 0 {
return nil
}

var out []types.Range
for _, r := range in {
if r.HiId <= r.LowId+1 {
// High end is exclusive, i.e. range 1..2 is equivalent to 1.
out = append(out, types.Range{Low: r.LowId})
} else {
out = append(out, types.Range{Low: r.LowId, Hi: r.HiId})
}
}

return out
}

// Trim whitespace, remove short/empty tags and duplicates, convert to lowercase, ensure
// the number of tags does not exceed the maximum.
func normalizeTags(src []string) types.StringSlice {
Expand Down

0 comments on commit ede3d8c

Please sign in to comment.