[IMP] Breaking changes in v3 release
As I was a newbie who started this project 2 years ago. I had made tons of mistakes by doing an initial release v1.0.0 instead of v0.0.1 as I thought it would be fine but now after gaining experience it seems like I will have to do some major changes.
As a library, one must never print to os.Stderr, instead of doing that one must return an err and let the user handle it plus Color field would be renamed to BoxColor so that it will be consistent to TitleColor and ContentColor:
package main
import "github.com/Delta456/box-cli-maker/v3"
import "log"
func main() {
Box := box.New(box.Config{Px: 2, Py: 5, Type: "Single", BoxColor: "Cyan"})
err := Box.Print("Box CLI Maker", "Highly Customized Terminal Box Maker")
if err != nil {
log.Fatal(err)
}
}
Most of the panics for unknown Color types will also be changed probably to err so that the user can handle those too.
Warnings like Unknown Color Terminal Profile, Unknown Alignment provided etc will also be changed to err, though the Box will still be created successfully with default settings.
If there are any more changes needed then I will also add those too.
I am also hoping to remove https://github.com/Delta456/box-cli-maker/blob/master/detect_windows.go#L20-L27 and https://github.com/Delta456/box-cli-maker/blob/master/detect_unix.go#L18-L25 for good.