Open Delta456 opened 2 years ago
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.
I am now more well-versed in deciding the design. I am trying to follow the API design of charmbracelet/lipgloss and cahrmbracelete/huh.
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 ofv0.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 anerr
and let the user handle it plusColor
field would be renamed toBoxColor
so that it will be consistent toTitleColor
andContentColor
:Most of the panics for
unknown Color types
will also be changed probably toerr
so that the user can handle those too.Warnings like
Unknown Color Terminal Profile
,Unknown Alignment provided
etc will also be changed toerr
, 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.