Re: [go-nuts] Data structure code review

2024-03-03 Thread Steven Hartland
Some feedback: Instead of errors.New(emptyDataStructureMessage("stack")) use an emptyDataError type, where it implements the error interface by adding an Error() string method, for example: type emptyDataError string func (e emptyDataError) Error() string { return fmt.Sprintf("not empty %s

[go-nuts] Data structure code review

2024-03-03 Thread Miss Adorable
Hi! I wrote my first data structure in Go. I wonder how idiomatic my code is to enhance it. Previously, I had C# and Java experience. -- You received this message because you are subscribed to the Google Groups