Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 5,774 for rain (0.04 sec)

  1. test/typeparam/valimp.dir/main.go

    // Copyright 2021 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"./a"
    	"fmt"
    )
    
    func main() {
    	var v1 a.Value[int]
    
    	a.Set(&v1, 1)
    	if got, want := a.Get(&v1), 1; got != want {
    		panic(fmt.Sprintf("Get() == %d, want %d", got, want))
    	}
    	v1.Set(2)
    	if got, want := v1.Get(), 2; got != want {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 24 02:14:15 UTC 2022
    - 1.3K bytes
    - Viewed (0)
  2. test/fixedbugs/issue40252.dir/main.go

    // Copyright 2020 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import "./a"
    
    func main() {
    	defer func() {
    		if recover() == nil {
    			panic("expected nil pointer dereference")
    		}
    	}()
    	a.Call()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Aug 15 00:23:28 UTC 2020
    - 308 bytes
    - Viewed (0)
  3. test/fixedbugs/issue58563.dir/main.go

    // Copyright 2023 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import "test/a"
    
    func main() {
    	stop := start()
    	defer stop()
    }
    
    func start() func() {
    	return a.Start().Stop
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 01 20:26:10 UTC 2023
    - 286 bytes
    - Viewed (0)
  4. test/fixedbugs/bug506.dir/main.go

    // Copyright 2018 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"fmt"
    
    	"./a"
    )
    
    var v = a.S{}
    
    func main() {
    	want := "{{ 0}}"
    	if got := fmt.Sprint(v.F); got != want {
    		panic(got)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 18 04:57:41 UTC 2018
    - 308 bytes
    - Viewed (0)
  5. test/fixedbugs/bug191.dir/main.go

    // Copyright 2009 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import . "./a"
    import . "./b"
    
    var _ T
    var _ V
    
    func main() {
    	if A != 1 || B != 2 {
    		panic("wrong vars")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 10 20:05:37 UTC 2013
    - 286 bytes
    - Viewed (0)
  6. src/cmd/cgo/internal/testshared/testdata/iface/main.go

    // Copyright 2017 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import "testshared/iface_a"
    import "testshared/iface_b"
    
    func main() {
    	if iface_a.F() != iface_b.F() {
    		panic("empty interfaces not equal")
    	}
    	if iface_a.G() != iface_b.G() {
    		panic("non-empty interfaces not equal")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 399 bytes
    - Viewed (0)
  7. src/cmd/cgo/internal/testcshared/testdata/go2c2go/m1/main.go

    // Copyright 2018 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    // extern int CFunc(void);
    import "C"
    
    import (
    	"fmt"
    	"os"
    )
    
    func main() {
    	got := C.CFunc()
    	const want = (1 << 8) | 2
    	if got != want {
    		fmt.Printf("got %#x, want %#x\n", got, want)
    		os.Exit(1)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 380 bytes
    - Viewed (0)
  8. test/typeparam/issue51250a.dir/main.go

    // Copyright 2022 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"./a"
    	"./b"
    )
    
    func main() {
    	switch b.I.(type) {
    	case a.G[b.T]:
    	case int:
    		panic("bad")
    	case float64:
    		panic("bad")
    	default:
    		panic("bad")
    	}
    
    	b.F(a.G[b.T]{})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 03 00:23:02 UTC 2022
    - 355 bytes
    - Viewed (0)
  9. test/typeparam/issue48462.dir/main.go

    // Copyright 2021 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"fmt"
    	"reflect"
    
    	"./a"
    )
    
    func main() {
    	e := []int{1, 2, 2, 3, 1, 6}
    
    	got := a.Unique(e)
    	want := []int{1, 2, 3, 6}
    	if !reflect.DeepEqual(got, want) {
    		panic(fmt.Sprintf("got %d, want %d", got, want))
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 24 02:14:15 UTC 2022
    - 397 bytes
    - Viewed (0)
  10. test/fixedbugs/issue31959.dir/main.go

    // license that can be found in the LICENSE file.
    
    // Check import package contains type alias in function
    // with the same name with an export type not panic
    
    package main
    
    import (
    	"fmt"
    
    	"./a"
    )
    
    func main() {
    	fmt.Println(a.T{})
    	a.F()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 24 02:14:15 UTC 2022
    - 361 bytes
    - Viewed (0)
Back to top