- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for TypeFor (0.2 sec)
-
src/reflect/type_test.go
) testcases := []struct { wantFrom any got reflect.Type }{ {new(int), reflect.TypeFor[int]()}, {new(int64), reflect.TypeFor[int64]()}, {new(string), reflect.TypeFor[string]()}, {new(mystring), reflect.TypeFor[mystring]()}, {new(any), reflect.TypeFor[any]()}, {new(myiface), reflect.TypeFor[myiface]()}, } for _, tc := range testcases { want := reflect.ValueOf(tc.wantFrom).Elem().Type()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 23:39:44 UTC 2024 - 4.2K bytes - Viewed (0) -
src/cmd/vet/testdata/stdversion/stdversion.go
package stdversion import "reflect"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 01:02:40 UTC 2024 - 142 bytes - Viewed (0) -
src/unique/clone_test.go
testCloneSeq[testStruct](t, cSeq(8)) } func cSeq(stringOffsets ...uintptr) cloneSeq { return cloneSeq{stringOffsets: stringOffsets} } func testCloneSeq[T any](t *testing.T, want cloneSeq) { typName := reflect.TypeFor[T]().Name() typ := abi.TypeOf(*new(T)) t.Run(typName, func(t *testing.T) { got := makeCloneSeq(typ) if !reflect.DeepEqual(got, want) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 18:14:07 UTC 2024 - 1K bytes - Viewed (0) -
pkg/typemap/map.go
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Apr 17 16:38:40 UTC 2024 - 1.2K bytes - Viewed (0) -
src/unique/handle_test.go
s: [2]testStringStruct{testStringStruct{"y"}, testStringStruct{"z"}}, }) testHandle[testStruct](t, testStruct{0.5, "184"}) } func testHandle[T comparable](t *testing.T, value T) { name := reflect.TypeFor[T]().Name() t.Run(fmt.Sprintf("%s/%#v", name, value), func(t *testing.T) { t.Parallel() v0 := Make(value) v1 := Make(value) if v0.Value() != v1.Value() { t.Error("v0.Value != v1.Value") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 18:14:07 UTC 2024 - 2.5K bytes - Viewed (0) -
doc/next/3-tools.md
by any [`//go:build` constraints](https://pkg.go.dev/cmd/go#hdr-Build_constraints) in the file.) For example, it will report a diagnostic for a reference to the `reflect.TypeFor` function (introduced in go1.22) from a file in a module whose go.mod file specifies `go 1.21`. ### Cgo {#cgo} <!-- go.dev/issue/66456 --> [cmd/cgo] supports the new `-ldflags` flag for passing flags to the C linker.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 28 19:06:07 UTC 2024 - 3.4K bytes - Viewed (0) -
doc/next/9-todo.md
CL 514775 - implements a performance optimization for accepted proposal https://go.dev/issue/59488 CL 484995 - x/sys CL implements accepted proposal https://go.dev/issue/59537 to add x/sys/unix API CL 555597 - optimizes TypeFor (added in accepted proposal https://go.dev/issue/60088) for non-interface types; doesn't seem to need a release note
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 11 17:18:52 UTC 2024 - 6K bytes - Viewed (0) -
src/database/sql/driver/types.go
// are an error. var DefaultParameterConverter defaultConverter type defaultConverter struct{} var _ ValueConverter = defaultConverter{} var valuerReflectType = reflect.TypeFor[Valuer]() // callValuerValue returns vr.Value(), with one exception: // If vr.Value is an auto-generated method on a pointer type and the // pointer is nil, it would panic at runtime in the panicwrap
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 27 16:30:20 UTC 2024 - 8.8K bytes - Viewed (0)