]> Cypherpunks.ru repositories - gotai64n.git/commitdiff
Fix failing when non-TAI64N strings are met
authorSergey Matveev <stargrave@stargrave.org>
Wed, 28 Apr 2021 11:57:21 +0000 (14:57 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Wed, 28 Apr 2021 11:57:21 +0000 (14:57 +0300)
cmd/tai64nlocal/main.go

index 571c30ac8ffe87271312af27bbc130b685ea085e..4b58127a6fdfabd0a74da6ee3c64a835b8bbb340 100644 (file)
@@ -44,10 +44,12 @@ func main() {
                s = scanner.Text()
                if s[0] != '@' {
                        os.Stdout.WriteString(s + "\n")
+                       continue
                }
                sep = strings.IndexByte(s, byte(' '))
                if sep == -1 {
                        os.Stdout.WriteString(s + "\n")
+                       continue
                }
                t, err = tai64n.Decode(s[1:sep])
                if err != nil {