Fix optional/pointer indirection errors

This commit is contained in:
Bryce Lampe
2024-04-16 13:03:21 -07:00
parent 59fd3c84e5
commit eca03ce6db
15 changed files with 138 additions and 90 deletions

View File

@@ -96,8 +96,8 @@ func (k mapKeeper) keep(m map[string]string) map[string]string {
type contextKeeper struct{ preview bool }
func (k contextKeeper) keep(bc BuildContext) BuildContext {
if !k.preview || len(bc.Named) == 0 {
func (k contextKeeper) keep(bc *BuildContext) *BuildContext {
if !k.preview || bc == nil || len(bc.Named) == 0 {
return bc
}
@@ -110,7 +110,7 @@ func (k contextKeeper) keep(bc BuildContext) BuildContext {
named[k] = v
}
return BuildContext{
return &BuildContext{
Context: Context{bc.Location},
Named: named,
}