rs / zerolog

Zero Allocation JSON Logger
MIT License
10.41k stars 567 forks source link

doc: update readme to use os-specific path separator #534

Closed youming-lin closed 6 months ago

andrii-zakurenyi commented 1 year ago

Hi @youming-lin Can you please update the code to use filepath.Base() instead of that custom for loop: https://pkg.go.dev/path/filepath#Base

Something like:

return filepath.Base(file) + ":" + strconv.Itoa(line)
youming-lin commented 1 year ago

@andrii-zakurenyi Absolutely! That's what I ended up using as well after a bit more Googling 😃

I've updated the PR, please check again.