Getting panics at https://github.com/pbnjay/strptime/blob/master/strptime.go#L104 and https://github.com/pbnjay/strptime/blob/master/strptime.go#L111i when testing all kinds of bad format strings.
First panic slice bounds out of range happens when I test with format=invalid format with input of something like 12/12/17 -- or format strings with prefixes that are longer than the input strings. Should add some length checks of the input and format here before moving on. e.g. return error if len(ps) > len(value)
Second panic index out of range happens with format = %, %%, %%i etc. Probably just need to add a len check for ps before grabbing ps[0] and return an error if it's empty?
Getting panics at https://github.com/pbnjay/strptime/blob/master/strptime.go#L104 and https://github.com/pbnjay/strptime/blob/master/strptime.go#L111i when testing all kinds of bad format strings.
First panic
slice bounds out of rangehappens when I test with format=invalid formatwith input of something like12/12/17-- or format strings with prefixes that are longer than the input strings. Should add some length checks of the input and format here before moving on. e.g. return error iflen(ps) > len(value)Second panic
index out of rangehappens with format =%,%%,%%ietc. Probably just need to add alencheck forpsbefore grabbingps[0]and return an error if it's empty?