removing go-sdk completely
This commit is contained in:
parent
07a9cdf513
commit
762b314e86
2 changed files with 10 additions and 3 deletions
4
PROFANITY_RULES.yml
Normal file
4
PROFANITY_RULES.yml
Normal 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"
|
9
times.go
9
times.go
|
@ -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())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue