Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for union (0.3 sec)

  1. internal/config/lambda/event/targetidset.go

    		setCopy[k] = v
    	}
    	return setCopy
    }
    
    // add - adds TargetID to the set.
    func (set TargetIDSet) add(targetID TargetID) {
    	set[targetID] = struct{}{}
    }
    
    // Union - returns union with given set as new set.
    func (set TargetIDSet) Union(sset TargetIDSet) TargetIDSet {
    	nset := set.Clone()
    
    	for k := range sset {
    		nset.add(k)
    	}
    
    	return nset
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  2. internal/config/lambda/event/targetidset_test.go

    		{NewTargetIDSet(TargetID{"1", "webhook"}), NewTargetIDSet(TargetID{"1", "webhook"}), NewTargetIDSet(TargetID{"1", "webhook"})},
    	}
    
    	for i, testCase := range testCases {
    		result := testCase.set.Union(testCase.setToAdd)
    
    		if !reflect.DeepEqual(testCase.expectedResult, result) {
    			t.Fatalf("test %v: result: expected: %v, got: %v", i+1, testCase.expectedResult, result)
    		}
    	}
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Mar 07 16:12:41 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  3. internal/event/targetidset_test.go

    		{NewTargetIDSet(TargetID{"1", "webhook"}), NewTargetIDSet(TargetID{"1", "webhook"}), NewTargetIDSet(TargetID{"1", "webhook"})},
    	}
    
    	for i, testCase := range testCases {
    		result := testCase.set.Union(testCase.setToAdd)
    
    		if !reflect.DeepEqual(testCase.expectedResult, result) {
    			t.Fatalf("test %v: result: expected: %v, got: %v", i+1, testCase.expectedResult, result)
    		}
    	}
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 3.9K bytes
    - Viewed (0)
  4. misc/cgo/gmp/gmp.go

    a Go translation.  C arithmetic types translate to precisely-sized Go
    arithmetic types.  A C struct translates to a Go struct, field by
    field; unrepresentable fields are replaced with opaque byte arrays.  A
    C union translates into a struct containing the first union member and
    perhaps additional padding.  C arrays become Go arrays.  C pointers
    become Go pointers.  C function pointers become Go's uintptr.
    C void pointers become Go's unsafe.Pointer.
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Apr 11 16:34:30 GMT 2022
    - 9.5K bytes
    - Viewed (0)
  5. src/cmd/cgo/gcc.go

    // struct_foo becomes "struct foo", and similarly for
    // union and enum.
    func cname(s string) string {
    	if t, ok := nameToC[s]; ok {
    		return t
    	}
    
    	if strings.HasPrefix(s, "struct_") {
    		return "struct " + s[len("struct_"):]
    	}
    	if strings.HasPrefix(s, "union_") {
    		return "union " + s[len("union_"):]
    	}
    	if strings.HasPrefix(s, "enum_") {
    		return "enum " + s[len("enum_"):]
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Nov 02 16:43:23 GMT 2023
    - 97K bytes
    - Viewed (0)
  6. src/cmd/cgo/godefs.go

    	// into the file, so we can't warn here.
    	//
    	// The most common case is union types, which begin with
    	// _Ctype_union and for which typedef[name] is a Go byte
    	// array of the appropriate size (such as [4]byte).
    	// Substitute those union types with byte arrays.
    	for name, id := range goIdent {
    		if id.Name == name && strings.Contains(name, "_Ctype_union") {
    			if def := typedef[name]; def != nil {
    				id.Name = gofmt(def)
    			}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Sep 08 14:33:35 GMT 2022
    - 4.5K bytes
    - Viewed (0)
  7. internal/event/targetidset.go

    		setCopy[k] = v
    	}
    	return setCopy
    }
    
    // add - adds TargetID to the set.
    func (set TargetIDSet) add(targetID TargetID) {
    	set[targetID] = struct{}{}
    }
    
    // Union - returns union with given set as new set.
    func (set TargetIDSet) Union(sset TargetIDSet) TargetIDSet {
    	nset := set.Clone()
    
    	for k := range sset {
    		nset.add(k)
    	}
    
    	return nset
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  8. src/cmd/cgo/doc.go

    A few special C types which would normally be represented by a pointer
    type in Go are instead represented by a uintptr.  See the Special
    cases section below.
    
    To access a struct, union, or enum type directly, prefix it with
    struct_, union_, or enum_, as in C.struct_stat.
    
    The size of any C type T is available as C.sizeof_T, as in
    C.sizeof_struct_stat.
    
    A C function may be declared in the Go file with a parameter type of
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Sun Mar 31 09:02:45 GMT 2024
    - 42.1K bytes
    - Viewed (0)
  9. internal/s3select/sql/parser.go

    var (
    	sqlLexer = lexer.Must(lexer.Regexp(`(\s+)` +
    		`|(?P<Timeword>(?i)\b(?:YEAR|MONTH|DAY|HOUR|MINUTE|SECOND|TIMEZONE_HOUR|TIMEZONE_MINUTE)\b)` +
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 12.9K bytes
    - Viewed (0)
  10. internal/event/rules.go

    			targetIDs = targetIDs.Union(targetIDSet)
    		}
    	}
    
    	return targetIDs
    }
    
    // Clone - returns copy of this rules.
    func (rules Rules) Clone() Rules {
    	rulesCopy := make(Rules)
    
    	for pattern, targetIDSet := range rules {
    		rulesCopy[pattern] = targetIDSet.Clone()
    	}
    
    	return rulesCopy
    }
    
    // Union - returns union with given rules as new rules.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 2.7K bytes
    - Viewed (0)
Back to top