aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/terraform/dag
diff options
context:
space:
mode:
authorJake Champlin <jake@gnu.space>2017-06-09 17:54:32 +0000
committerJake Champlin <jake@gnu.space>2017-06-09 17:54:32 +0000
commit9b12e4fe6f3c95986f1f3ec791636c58ca7e7583 (patch)
tree38f5f12bec0e488a12f0459a7356e6b7de7d8f84 /vendor/github.com/hashicorp/terraform/dag
parentcec3de8a3bcaffd21dedd1bf42da4b490cae7e16 (diff)
downloadterraform-provider-statuscake-9b12e4fe6f3c95986f1f3ec791636c58ca7e7583.tar.gz
terraform-provider-statuscake-9b12e4fe6f3c95986f1f3ec791636c58ca7e7583.tar.zst
terraform-provider-statuscake-9b12e4fe6f3c95986f1f3ec791636c58ca7e7583.zip
Transfer of provider code
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/dag')
-rw-r--r--vendor/github.com/hashicorp/terraform/dag/set.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/terraform/dag/set.go b/vendor/github.com/hashicorp/terraform/dag/set.go
index 3929c9d..92b4215 100644
--- a/vendor/github.com/hashicorp/terraform/dag/set.go
+++ b/vendor/github.com/hashicorp/terraform/dag/set.go
@@ -81,6 +81,20 @@ func (s *Set) Difference(other *Set) *Set {
81 return result 81 return result
82} 82}
83 83
84// Filter returns a set that contains the elements from the receiver
85// where the given callback returns true.
86func (s *Set) Filter(cb func(interface{}) bool) *Set {
87 result := new(Set)
88
89 for _, v := range s.m {
90 if cb(v) {
91 result.Add(v)
92 }
93 }
94
95 return result
96}
97
84// Len is the number of items in the set. 98// Len is the number of items in the set.
85func (s *Set) Len() int { 99func (s *Set) Len() int {
86 if s == nil { 100 if s == nil {