Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 4,589 for struct (0.11 sec)

  1. src/cmd/compile/internal/types2/struct.go

    )
    
    // ----------------------------------------------------------------------------
    // API
    
    // A Struct represents a struct type.
    type Struct struct {
    	fields []*Var   // fields != nil indicates the struct is set up (possibly with len(fields) == 0)
    	tags   []string // field tags; nil if there are no tags
    }
    
    // NewStruct returns a new struct with the given fields and corresponding field tags.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 22:06:18 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  2. test/typeparam/struct.go

    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"fmt"
    )
    
    type E[T any] struct {
    	v T
    }
    
    type S1 struct {
    	E[int]
    	v string
    }
    
    type Eint = E[int]
    type Ebool = E[bool]
    type Eint2 = Eint
    
    type S2 struct {
    	Eint
    	Ebool
    	v string
    }
    
    type S3 struct {
    	*E[int]
    }
    
    func main() {
    	s1 := S1{Eint{2}, "foo"}
    	if got, want := s1.E.v, 2; got != want {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 05 16:29:58 UTC 2024
    - 801 bytes
    - Viewed (0)
  3. src/go/types/struct.go

    )
    
    // ----------------------------------------------------------------------------
    // API
    
    // A Struct represents a struct type.
    type Struct struct {
    	fields []*Var   // fields != nil indicates the struct is set up (possibly with len(fields) == 0)
    	tags   []string // field tags; nil if there are no tags
    }
    
    // NewStruct returns a new struct with the given fields and corresponding field tags.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 22:06:18 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  4. operator/pkg/tpath/struct.go

    // See the License for the specific language governing permissions and
    // limitations under the License.
    
    /*
    struct.go contains functions for traversing and modifying trees of Go structs.
    */
    package tpath
    
    import (
    	"fmt"
    	"reflect"
    	"strconv"
    
    	"google.golang.org/protobuf/types/known/structpb"
    
    	"istio.io/istio/operator/pkg/util"
    )
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 25 19:30:47 UTC 2022
    - 4.4K bytes
    - Viewed (0)
  5. test/codegen/structs.go

    package codegen
    
    // This file contains code generation tests related to the handling of
    // struct types.
    
    // ------------- //
    //    Zeroing    //
    // ------------- //
    
    type Z1 struct {
    	a, b, c int
    }
    
    func Zero1(t *Z1) { // Issue #18370
    	// amd64:`MOVUPS\tX[0-9]+, \(.*\)`,`MOVQ\t\$0, 16\(.*\)`
    	*t = Z1{}
    }
    
    type Z2 struct {
    	a, b, c *int
    }
    
    func Zero2(t *Z2) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 923 bytes
    - Viewed (0)
  6. doc/next/6-stdlib/3-structs.md

    ### New structs package
    
    The new [structs] package provides
    types for struct fields that modify properties of
    the containing struct type such as memory layout.
    
    In this release, the only such type is
    [`HostLayout`](/pkg/structs#HostLayout)
    which indicates that a structure with a field of that
    type has a layout that conforms to host platform
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 16:06:02 UTC 2024
    - 356 bytes
    - Viewed (0)
  7. src/internal/types/testdata/check/conversions1.go

    	var u struct {
    		x struct {
    			x int "bar"
    		} "bar"
    	}
    	s = s
    	s = t // ERRORx `cannot use .* in assignment`
    	s = u // ERRORx `cannot use .* in assignment`
    	s = S(s)
    	s = S(t)
    	s = S(u)
    	t = u // ERRORx `cannot use .* in assignment`
    	t = T(u)
    }
    
    func _() {
    	type E1 struct {
    		x int "foo"
    	}
    	type E2 struct {
    		x int "bar"
    	}
    	type S struct{ x E1 }
    	type T struct {
    		x E2 "foo"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:27 UTC 2023
    - 5.1K bytes
    - Viewed (0)
  8. src/structs/hostlayout.go

    package structs
    
    // HostLayout marks a struct as using host memory layout. A struct with a
    // field of type HostLayout will be laid out in memory according to host
    // expectations, generally following the host's C ABI.
    //
    // HostLayout does not affect layout within any other struct-typed fields
    // of the containing struct, nor does it affect layout of structs
    // containing the struct marked as host layout.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 21:19:39 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  9. test/convert2.go

    	t = u    // ERROR "cannot use .* in assignment|incompatible type"
    	t = T(u)
    }
    
    func _() {
    	type E struct{ x int }
    	type S struct {
    		f func(struct {
    			x int "foo"
    		})
    	}
    	type T struct {
    		f func(struct {
    			x int "bar"
    		})
    	}
    	var s S
    	var t T
    	var u struct{ f func(E) }
    	s = s
    	s = t // ERROR "cannot use .* in assignment|incompatible type"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 08 15:55:44 UTC 2022
    - 5.9K bytes
    - Viewed (0)
  10. src/internal/types/testdata/check/cycles0.go

    	A5 [10]A6
    	A6 *A5
    
    	// slices
    	L0 []L0
    
    	// structs
    	S0 /* ERROR "invalid recursive type: S0 refers to itself" */ struct{ _ S0 }
    	S1 /* ERROR "invalid recursive type: S1 refers to itself" */ struct{ S1 }
    	S2 struct{ _ *S2 }
    	S3 struct{ *S3 }
    
    	S4 /* ERROR "invalid recursive type" */ struct{ S5 }
    	S5 struct{ S6 }
    	S6 S4
    
    	// pointers
    	P0 *P0
    	PP *struct{ PP.f /* ERROR "PP.f is not a type" */ }
    
    	// functions
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:25 UTC 2023
    - 3.6K bytes
    - Viewed (0)
Back to top