From 5a3bd3ca67a19f1746c80f62babe3f2b8aa8c165 Mon Sep 17 00:00:00 2001 From: James Shubin Date: Fri, 16 Jun 2017 23:01:46 -0400 Subject: [PATCH] hcl: Consistent formatting Nit picks. --- hcl/parse.go | 10 +++++----- resources/sendrecv.go | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hcl/parse.go b/hcl/parse.go index 7c1cf327..8f7b2b46 100644 --- a/hcl/parse.go +++ b/hcl/parse.go @@ -91,12 +91,12 @@ func graphFromConfig(c *Config, data gapi.Data) (*pgraph.Graph, error) { var keep []pgraph.Vertex var resourceList []resources.Res - log.Printf("HCL: parsing %d resources", len(c.Resources)) + log.Printf("hcl: parsing %d resources", len(c.Resources)) for _, r := range c.Resources { res := r.resource kind := r.resource.GetKind() - log.Printf("HCL: resource \"%s\" \"%s\"", kind, r.Name) + log.Printf("hcl: resource \"%s\" \"%s\"", kind, r.Name) if !strings.HasPrefix(res.GetName(), "@@") { fn := func(v pgraph.Vertex) (bool, error) { return resources.VtoR(v).Compare(res), nil @@ -324,7 +324,7 @@ func loadResourcesHcl(list *ast.ObjectList) ([]*Resource, error) { var config map[string]interface{} if err := hcl.DecodeObject(&config, item.Val); err != nil { - log.Printf("HCL: unable to decode body: %v", err) + log.Printf("hcl: unable to decode body: %v", err) return nil, fmt.Errorf( "Error reading config for %s: %s", name, @@ -359,14 +359,14 @@ func loadResourcesHcl(list *ast.ObjectList) ([]*Resource, error) { res, err := resources.NewResource(kind) if err != nil { - log.Printf("HCLParse: unable to parse resource: %v", err) + log.Printf("hcl: unable to parse resource: %v", err) return nil, err } res.SetName(name) if err := hcl.DecodeObject(res, item.Val); err != nil { - log.Printf("HCLParse: unable to decode body: %v", err) + log.Printf("hcl: unable to decode body: %v", err) return nil, fmt.Errorf( "Error reading config for %s: %s", name, diff --git a/resources/sendrecv.go b/resources/sendrecv.go index 9d599219..3c1add40 100644 --- a/resources/sendrecv.go +++ b/resources/sendrecv.go @@ -173,7 +173,7 @@ type Send struct { Changed bool // set to true if this key was updated, read only! } -// SetRecv sets the Res Recv field to given map of Send structs +// SetRecv sets the Res Recv field to given map of Send structs. func (obj *BaseRes) SetRecv(recv map[string]*Send) { obj.Recv = recv }