lxc / go-lxc

Go bindings for liblxc
https://linuxcontainers.org/lxc
Other
428 stars 77 forks source link

Make errors constants #124

Closed caglar10ur closed 5 years ago

caglar10ur commented 5 years ago

since we don't want users to set them to nil

Signed-off-by: S.Çağlar Onur caglar@10ur.org

tomponline commented 5 years ago

@caglar10ur is this implementing this approach? https://dave.cheney.net/2016/04/07/constant-errors

caglar10ur commented 5 years ago

@tomponline yes, you are correct

tomponline commented 5 years ago

@caglar10ur saw this article the other night about a new package in go 1.13 called xerrors, looks interesting https://crawshaw.io/blog/xerrors

caglar10ur commented 5 years ago

@tomponline yep, I'm playing with it in $WORK - it is good but I think we can wait a bit to see what will happen to it since I think it is still an active debate topic :)