removing go-sdk completely

This commit is contained in:
Will Charczuk 2019-04-24 13:00:09 -07:00
parent 07a9cdf513
commit 762b314e86
2 changed files with 10 additions and 3 deletions

4
PROFANITY_RULES.yml Normal file
View file

@ -0,0 +1,4 @@
go-sdk:
excludeFiles: [ "*_test.go" ]
importsContain: [ github.com/blend/go-sdk/* ]
description: "please don't use go-sdk in this repo"

View file

@ -3,8 +3,6 @@ package chart
import (
"sort"
"time"
"github.com/blend/go-sdk/timeutil"
)
// Assert types implement interfaces.
@ -29,7 +27,7 @@ func (t Times) Len() int {
// GetValue returns a value at an index as a time.
func (t Times) GetValue(index int) float64 {
return timeutil.ToFloat64(t[index])
return ToFloat64(t[index])
}
// Swap implements sort.Interface.
@ -41,3 +39,8 @@ func (t Times) Swap(i, j int) {
func (t Times) Less(i, j int) bool {
return t[i].Before(t[j])
}
// ToFloat64 returns a float64 representation of a time.
func ToFloat64(t time.Time) float64 {
return float64(t.UnixNano())
}