|
|
|
|
|
by caylus
1429 days ago
|
|
> Well, that puts regex compilation in the same category as array indexing in my mind, and means that the default regex compilation function should panic on the user’s behalf I like the Go stdlib idiom for this: many functions have a version with a "Must" prefix that has the behavior of panicking rather than returning an error. e.g. for regexp: https://pkg.go.dev/regexp#MustCompile |
|