♻️ Refactor Timestamp Generator to single function with options
This commit is contained in:
parent
72791d4fac
commit
61a5199699
5 changed files with 113 additions and 67 deletions
15
gen_ts_test.go
Normal file
15
gen_ts_test.go
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
package nomino
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestTimestamp(t *testing.T) {
|
||||
n := time.Now()
|
||||
st, err := Timestamp()(nil)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, n.Format(FileTimestamp), st)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue