keywords: accurate nanoseconds for time=
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
d1ddeb8e3d
commit
ef9ba54f10
1 changed files with 2 additions and 4 deletions
|
@ -8,7 +8,6 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"hash"
|
"hash"
|
||||||
"io"
|
"io"
|
||||||
"math"
|
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"golang.org/x/crypto/ripemd160"
|
"golang.org/x/crypto/ripemd160"
|
||||||
|
@ -113,9 +112,8 @@ var (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
timeKeywordFunc = func(path string, info os.FileInfo) (string, error) {
|
timeKeywordFunc = func(path string, info os.FileInfo) (string, error) {
|
||||||
t := info.ModTime()
|
t := info.ModTime().UnixNano()
|
||||||
n := float64(t.UnixNano()) / math.Pow10(9)
|
return fmt.Sprintf("time=%d.%d", (t / 1e9), (t % (t / 1e9))), nil
|
||||||
return fmt.Sprintf("time=%0.9f", n), nil
|
|
||||||
}
|
}
|
||||||
linkKeywordFunc = func(path string, info os.FileInfo) (string, error) {
|
linkKeywordFunc = func(path string, info os.FileInfo) (string, error) {
|
||||||
if info.Mode()&os.ModeSymlink != 0 {
|
if info.Mode()&os.ModeSymlink != 0 {
|
||||||
|
|
Loading…
Reference in a new issue