@@ -26,8 +26,8 @@ type Config map[TerraformResourceType][]TypeFilter
2626
2727// TypeFilter represents an entry in Config and selects the resources of a particular resource type.
2828type TypeFilter struct {
29- ID * StringFilter `yaml:",omitempty"`
30- Tags map [string ]* StringFilter `yaml:",omitempty"`
29+ ID * StringFilter `yaml:",omitempty"`
30+ Tags map [string ]* StringFilter `yaml:",omitempty"`
3131 // select resources by creation time
3232 Created * Created `yaml:",omitempty"`
3333}
@@ -38,10 +38,10 @@ type StringMatcher interface {
3838
3939type StringFilter struct {
4040 Pattern string `yaml:",omitempty"`
41- Negate bool
41+ Negate bool
4242}
4343
44- type CreatedTime struct {
44+ type CreatedTime struct {
4545 time.Time `yaml:",omitempty"`
4646}
4747
@@ -187,11 +187,11 @@ func (f Filter) matches(r *Resource) bool {
187187func (f * StringFilter ) matches (s string ) (bool , error ) {
188188 ok , err := regexp .MatchString (f .Pattern , s )
189189 if err != nil {
190- return false , err
190+ return false , err
191191 }
192-
192+
193193 if f .Negate {
194- return ! ok , nil
194+ return ! ok , nil
195195 }
196196
197197 return ok , err
@@ -223,11 +223,11 @@ func (c *CreatedTime) UnmarshalYAML(unmarshal func(interface{}) error) error {
223223 case string :
224224 d , err := time .ParseDuration (value )
225225 if err == nil {
226- * c = CreatedTime {time .Now ().UTC ().Add (- d )}
226+ * c = CreatedTime {time .Now ().UTC ().Add (- d )}
227227 return nil
228228 }
229229 var t time.Time
230- err = yaml .Unmarshal ([]byte ("!!timestamp " + value ), & t )
230+ err = yaml .Unmarshal ([]byte ("!!timestamp " + value ), & t )
231231 if err == nil {
232232 * c = CreatedTime {t }
233233 return nil
@@ -262,4 +262,4 @@ func (c *CreatedTime) UnmarshalYAML(unmarshal func(interface{}) error) error {
262262 }
263263 }
264264 return errors .New ("invalid created time" )
265- }
265+ }
0 commit comments