Closed ijt closed 2 years ago
It could look something like this:
anytime.PartitionTimes("Let's meet Thursday or Friday if you're free") => []any{"Let's meet", time.Time{...}, "or", time.Time{...}, "if you're free"}
anytime.PartitionTimes("Let's meet Thursday or Friday if you're free")
[]any{"Let's meet", time.Time{...}, "or", time.Time{...}, "if you're free"}
Alternatively there could be something based on callbacks:
anytime.PartitionTimesByFunc("Let's meet Thursday or Friday", func(s string) {/* non-time */}, func(t time.Time, s string) {/* time */})
That would be more type safe.
It could look something like this:
anytime.PartitionTimes("Let's meet Thursday or Friday if you're free")
=>[]any{"Let's meet", time.Time{...}, "or", time.Time{...}, "if you're free"}
Alternatively there could be something based on callbacks:
anytime.PartitionTimesByFunc("Let's meet Thursday or Friday", func(s string) {/* non-time */}, func(t time.Time, s string) {/* time */})
That would be more type safe.