]> Cypherpunks.ru repositories - goredo.git/blobdiff - run.go
Move tai64n to separate module
[goredo.git] / run.go
diff --git a/run.go b/run.go
index e40ad1d5d5e4b65a262ea385b4a0e10df3274fa6..ac607a696b0ceea461d0147e9ef555ad8f663f59 100644 (file)
--- a/run.go
+++ b/run.go
@@ -21,7 +21,6 @@ package main
 
 import (
        "bufio"
-       "encoding/hex"
        "errors"
        "flag"
        "fmt"
@@ -35,6 +34,7 @@ import (
        "time"
 
        "go.cypherpunks.ru/recfile"
+       "go.cypherpunks.ru/tai64n"
        "golang.org/x/sys/unix"
 )
 
@@ -409,7 +409,7 @@ func runScript(tgtOrig string, errs chan error, traced bool) error {
                go func() {
                        scanner := bufio.NewScanner(stderr)
                        var line string
-                       ts := new(TAI64N)
+                       ts := new(tai64n.TAI64N)
                        for scanner.Scan() {
                                line = scanner.Text()
                                if strings.HasPrefix(line, childStderrPrefix) {
@@ -418,9 +418,9 @@ func runScript(tgtOrig string, errs chan error, traced bool) error {
                                        continue
                                }
                                if fdStderr != nil {
-                                       tai64nNow(ts)
+                                       tai64n.FromTime(time.Now(), ts)
                                        LogMutex.Lock()
-                                       fmt.Fprintf(fdStderr, "@%s %s\n", hex.EncodeToString(ts[:]), line)
+                                       fmt.Fprintf(fdStderr, "%s %s\n", ts.Encode(), line)
                                        LogMutex.Unlock()
                                }
                                if StderrSilent {