container: provide usage example

This requires cgo so unfortunately will not run in the playground.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-11-14 18:11:39 +09:00
parent b7406cc4c4
commit 299685775a
4 changed files with 47 additions and 3 deletions

View File

@@ -56,7 +56,7 @@ func NewAbs(pathname string) (*Absolute, error) {
// MustAbs calls [NewAbs] and panics on error.
func MustAbs(pathname string) *Absolute {
if a, err := NewAbs(pathname); err != nil {
panic(err.Error())
panic(err)
} else {
return a
}