-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
text.Scanner
is outputting unnecessary stderr
#58
Comments
|
@arran4 is it possible that I am encountering the same pseudo issue? With this example code: import (
"fmt"
"time"
"github.com/goodsign/monday"
)
func main () {
var (
timeLocaleDetector *monday.LocaleDetector = monday.NewLocaleDetector()
parsedStartDatetime time.Time
dateLayout string = "2 Jan 2006 15:04"
currentDate string = "19 May 2024 09:00"
)
parsedStartDatetime, _ = timeLocaleDetector.Parse(
dateLayout,
currentDate)
fmt.Println(parsedStartDatetime)
} The output is the following <input>:1:13: invalid digit '9' in octal literal
2024-05-19 09:00:00 +0000 UTC It appears more as a warning, because the datetime is parsed smootly and the Parse method of monday is not returning any error at all. |
Yep looks like it, I am not sure if my PR addresses this or not or other things but try the version in that to see if it's any better. |
text.Scanner
is outputting errors. Such as:Such as when I use tokens like
'
':I believe this is because
text.Scanner
is build to parse go tokens for a compiler.Which technically means I should be able to break tests by passing in tokens like
/*
and when it /could/ be a valid format string.Ie:
Outputs:
The text was updated successfully, but these errors were encountered: