From c093a38d9536be3b40c5c6f5d5699307257d968e Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Mon, 11 Jan 2021 18:05:52 -0800 Subject: [PATCH] component: stop mixing pointers and non pointers Signed-off-by: Andrea Luzzardi --- dagger/component.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dagger/component.go b/dagger/component.go index d8dea639..ae0d0146 100644 --- a/dagger/component.go +++ b/dagger/component.go @@ -14,7 +14,7 @@ func (c *Component) Value() *Value { func (c *Component) Exists() bool { // Does #dagger exist? - return c.Config().Err() == nil + return c.Config().Exists() } // Return the contents of the "#dagger" annotation. @@ -26,7 +26,7 @@ func (c *Component) Config() *Value { // // NOTE: calling matchSpec("#Component") is not enough because // it does not match embedded scalars. -func (c Component) Validate() error { +func (c *Component) Validate() error { // FIXME: this crashes on `#dagger:compute:_` // see TestValidateEmptyComponent // Using a workaround for now. @@ -36,7 +36,7 @@ func (c Component) Validate() error { } // Return this component's compute script. -func (c Component) ComputeScript() (*Script, error) { +func (c *Component) ComputeScript() (*Script, error) { return c.Value().Get("#dagger.compute").Script() }