mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-11-04 10:03:42 +08:00 
			
		
		
		
	Extend hcl2 support with more functions
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
		
							
								
								
									
										4
									
								
								vendor/github.com/zclconf/go-cty/cty/set/rules.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/github.com/zclconf/go-cty/cty/set/rules.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -22,6 +22,10 @@ type Rules interface {
 | 
			
		||||
	// though it is *not* required that two values with the same hash value
 | 
			
		||||
	// be equivalent.
 | 
			
		||||
	Equivalent(interface{}, interface{}) bool
 | 
			
		||||
 | 
			
		||||
	// SameRules returns true if the instance is equivalent to another Rules
 | 
			
		||||
	// instance.
 | 
			
		||||
	SameRules(Rules) bool
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// OrderedRules is an extension of Rules that can apply a partial order to
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								vendor/github.com/zclconf/go-cty/cty/set/set.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/github.com/zclconf/go-cty/cty/set/set.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -41,7 +41,7 @@ func NewSetFromSlice(rules Rules, vals []interface{}) Set {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func sameRules(s1 Set, s2 Set) bool {
 | 
			
		||||
	return s1.rules == s2.rules
 | 
			
		||||
	return s1.rules.SameRules(s2.rules)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func mustHaveSameRules(s1 Set, s2 Set) {
 | 
			
		||||
@@ -53,7 +53,7 @@ func mustHaveSameRules(s1 Set, s2 Set) {
 | 
			
		||||
// HasRules returns true if and only if the receiving set has the given rules
 | 
			
		||||
// instance as its rules.
 | 
			
		||||
func (s Set) HasRules(rules Rules) bool {
 | 
			
		||||
	return s.rules == rules
 | 
			
		||||
	return s.rules.SameRules(rules)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Rules returns the receiving set's rules instance.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user