zerolog icon indicating copy to clipboard operation
zerolog copied to clipboard

doc: update readme to use os-specific path separator

Open youming-lin opened this issue 1 year ago • 2 comments

youming-lin avatar Mar 28 '23 19:03 youming-lin

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)

andrii-zakurenyi avatar May 01 '23 14:05 andrii-zakurenyi

@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.

youming-lin avatar May 02 '23 15:05 youming-lin