You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// CreateInfo wraps all SIF file creation info needed.
typeCreateInfostruct {
Pathnamestring// the end result output filename
Launchstrstring// the shell run command
Sifversionstring// the SIF specification version used
ID uuid.UUID// image unique identifier
InputDescr []DescriptorInput// slice of input info for descriptor creation
}
With this pattern, users must understand the internals of SIF to effectively call CreateContainer. It would be better if these were defaulted, with potential overrides supplied via the functional options pattern. For example:
Launchstr: default to sif.HdrLaunch
Sifversion: default to sif.HdrVersion
ID: default to a generated ID (perhaps the public API can avoid a UUID package at all, to prevent issues such as Replace Deprecated UUID Package #7).
InputDescr: default to empty list, allow DescriptorInput via functional option.
The text was updated successfully, but these errors were encountered:
sif.CreateContainer
currently accepts asif.CreateInfo
:sif/pkg/sif/sif.go
Lines 403 to 410 in 3a39a27
With this pattern, users must understand the internals of SIF to effectively call
CreateContainer
. It would be better if these were defaulted, with potential overrides supplied via the functional options pattern. For example:Launchstr
: default tosif.HdrLaunch
Sifversion
: default tosif.HdrVersion
ID
: default to a generated ID (perhaps the public API can avoid a UUID package at all, to prevent issues such as Replace Deprecated UUID Package #7).InputDescr
: default to empty list, allowDescriptorInput
via functional option.The text was updated successfully, but these errors were encountered: