]> Cypherpunks.ru repositories - gotai64n.git/blobdiff - cmd/tai64nlocal/main.go
Fix failing when non-TAI64N strings are met
[gotai64n.git] / cmd / tai64nlocal / main.go
index 2f3ed153f17f436b3ec5d6ac98245ea071ee0bc6..4b58127a6fdfabd0a74da6ee3c64a835b8bbb340 100644 (file)
@@ -1,6 +1,6 @@
 /*
 go.cypherpunks.ru/tai64n -- Pure Go TAI64N implementation
-Copyright (C) 2020 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2020-2021 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -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 {