Skip to content

Commit 97d8036

Browse files
committed
Remove dependency on github.com/remind101/pkg/timex
1 parent a22af74 commit 97d8036

File tree

8 files changed

+17
-7
lines changed

8 files changed

+17
-7
lines changed

apps.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"time"
1111

1212
"github.com/jinzhu/gorm"
13-
"github.com/remind101/pkg/timex"
13+
"github.com/remind101/empire/pkg/timex"
1414
"golang.org/x/net/context"
1515
)
1616

domains.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"time"
77

88
"github.com/jinzhu/gorm"
9-
"github.com/remind101/pkg/timex"
9+
"github.com/remind101/empire/pkg/timex"
1010
)
1111

1212
type Domain struct {

pkg/timex/timex.go

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package timex
2+
3+
import "time"
4+
5+
// Now is a function that returns the current time, but can easily be stubbed
6+
// out by setting it to a function that returns a mock value. The default is to
7+
// call time.Now().
8+
var Now = func() time.Time {
9+
return time.Now().UTC()
10+
}

releases.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66

77
"github.com/jinzhu/gorm"
88
"github.com/remind101/empire/pkg/headerutil"
9+
"github.com/remind101/empire/pkg/timex"
910
"github.com/remind101/empire/procfile"
1011
"github.com/remind101/empire/twelvefactor"
11-
"github.com/remind101/pkg/timex"
1212
"golang.org/x/net/context"
1313
)
1414

scheduler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
"io"
66
"sync"
77

8+
"github.com/remind101/empire/pkg/timex"
89
"github.com/remind101/empire/twelvefactor"
9-
"github.com/remind101/pkg/timex"
1010
"golang.org/x/net/context"
1111
)
1212

server/heroku/processes.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99
"github.com/remind101/empire/pkg/heroku"
1010
"github.com/remind101/empire/pkg/hijack"
1111
streamhttp "github.com/remind101/empire/pkg/stream/http"
12+
"github.com/remind101/empire/pkg/timex"
1213
"github.com/remind101/empire/server/auth"
1314
"github.com/remind101/pkg/httpx"
14-
"github.com/remind101/pkg/timex"
1515
"golang.org/x/net/context"
1616
)
1717

tests/cli/cli_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import (
1212
"github.com/remind101/empire"
1313
"github.com/remind101/empire/empiretest"
1414
"github.com/remind101/empire/empiretest/cli"
15+
"github.com/remind101/empire/pkg/timex"
1516
"github.com/remind101/empire/server/auth"
1617
"github.com/remind101/empire/server/heroku"
17-
"github.com/remind101/pkg/timex"
1818
)
1919

2020
// empPath can be used to change what binary is used to run the tests.

tests/empire/empire_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import (
1313
"github.com/remind101/empire"
1414
"github.com/remind101/empire/empiretest"
1515
"github.com/remind101/empire/pkg/image"
16+
"github.com/remind101/empire/pkg/timex"
1617
"github.com/remind101/empire/procfile"
1718
"github.com/remind101/empire/twelvefactor"
18-
"github.com/remind101/pkg/timex"
1919
"github.com/stretchr/testify/assert"
2020
"github.com/stretchr/testify/mock"
2121
)

0 commit comments

Comments
 (0)