Closed sriv closed 3 years ago
The build is presently failing in golang <= 1.9, because strings.Builder
is not available. I see that travis builds are setup for go 1.3+
Just wanted to check if the project aims to be compatible with go <=1.9, in which case I can use plain string concatenation.
go1.3 compatibility isn't strictly necessary but I've been enjoying the fact that this library is usable with all the runtimes over the last 6 years that it has been somewhat of a pet peeve to keep it that way. If it is really necessary to break it then I'll do it. However, I think you can just use bytes.Buffer
and it'll work.
Fair enough, and I think it makes sense especially when the change is as simple as you suggested. Should have thought of it myself, thanks for the quick review.
Hmm, so while being fun it isn't very helpful...
10 min for a CI run isn't really acceptable
Tagged v1.8.4. Thank you!
Context
When there are properties with circular references, the error message thrown contains one of the key in the cycle. This can be a bit annoying to fix, since it does not give a trace. Given this library supports loading properties from multiple sources,
grep
etc can fail.Input:
The error message thrown when
properties.MustLoadFile
is called with the above file:This pull request is an attempt to make it look better, my take:
This is not perfect, it still does not highlight the exact source of these properties, but I felt that the overhead of carrying that context to
properties.expand
may be a bit too much, since the method is currently stateless.Thanks for the library!