Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 6,738 for method1 (0.15 sec)

  1. src/cmd/vet/testdata/method/method.go

    // Copyright 2010 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.
    
    // This file contains the code to check canonical methods.
    
    package method
    
    import "fmt"
    
    type MethodTest int
    
    func (t *MethodTest) Scan(x fmt.ScanState, c byte) { // ERROR "should have signature Scan\(fmt\.ScanState, rune\) error"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 20 15:46:42 UTC 2019
    - 394 bytes
    - Viewed (0)
  2. test/method2.go

    	val() int
    }
    
    var _ = (*Val).val // ERROR "method|type \*Val is pointer to interface, not interface"
    
    var v Val
    var pv = &v
    
    var _ = pv.val() // ERROR "undefined|pointer to interface"
    var _ = pv.val   // ERROR "undefined|pointer to interface"
    
    func (t *T) g() int { return t.a }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 10 22:48:40 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  3. test/method4.go

    // rundir
    
    // Copyright 2012 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.
    
    // Test method expressions with arguments.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Oct 07 21:22:01 UTC 2012
    - 230 bytes
    - Viewed (0)
  4. test/method6.go

    // license that can be found in the LICENSE file.
    
    // Verify that pointer method calls are caught during typechecking.
    // Reproducer extracted and adapted from method.go
    
    package foo
    
    type A struct {
    	B
    }
    type B int
    
    func (*B) g() {}
    
    var _ = func() {
    	var a A
    	A(a).g() // ERROR "cannot call pointer method .*on|cannot take the address of"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 04 21:22:23 UTC 2020
    - 467 bytes
    - Viewed (0)
  5. test/method7.go

    type Outer struct{ *Inner }
    type Inner struct{ s string }
    
    func (i Inner) M() string { return i.s }
    
    func main() {
    	// method expressions with named receiver types
    	I.m(S{})
    	want += " m()"
    
    	S.m1(S{}, "a")
    	want += " m1(a)"
    
    	// method expressions with literal receiver types
    	f := interface{ m1(string) }.m1
    	f(S{}, "b")
    	want += " m1(b)"
    
    	interface{ m1(string) }.m1(S{}, "c")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 26 17:05:06 UTC 2021
    - 1.1K bytes
    - Viewed (0)
  6. src/net/http/method.go

    // Copyright 2015 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 http
    
    // Common HTTP methods.
    //
    // Unless otherwise noted, these are defined in RFC 7231 section 4.3.
    const (
    	MethodGet     = "GET"
    	MethodHead    = "HEAD"
    	MethodPost    = "POST"
    	MethodPut     = "PUT"
    	MethodPatch   = "PATCH" // RFC 5789
    	MethodDelete  = "DELETE"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 04 22:11:56 UTC 2016
    - 517 bytes
    - Viewed (0)
  7. test/method5.go

    // run
    
    // Copyright 2013 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
    
    // Concrete types implementing M method.
    // Smaller than a word, word-sized, larger than a word.
    // Value and pointer receivers.
    
    type Tinter interface {
    	M(int, byte) (byte, int)
    }
    
    type Tsmallv byte
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 6.7K bytes
    - Viewed (0)
  8. test/method.go

    // run
    
    // 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.
    
    // Test simple methods of various types, with pointer and
    // value receivers.
    
    package main
    
    type S string
    type S1 string
    type I int
    type I1 int
    type T struct {
    	x int
    }
    type T1 T
    
    func (s S) val() int   { return 1 }
    func (s *S1) val() int { return 2 }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 11 23:20:52 UTC 2013
    - 5.2K bytes
    - Viewed (0)
  9. test/method3.go

    // run
    
    // 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.
    
    // Test methods on slices.
    
    package main
    
    type T []int
    
    func (t T) Len() int { return len(t) }
    
    type I interface {
    	Len() int
    }
    
    func main() {
    	var t T = T{0, 1, 2, 3, 4}
    	var i I
    	i = t
    	if i.Len() != 5 {
    		println("i.Len", i.Len())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 23 07:47:26 UTC 2012
    - 570 bytes
    - Viewed (0)
  10. src/reflect/all_test.go

    	badMethod(func() { call(v.Field(2).Elem().Method(2)) }) // .NamedT0.w
    
    	ok(func() { call(v.Field(3).Method(0)) })               // .NamedT1.Y
    	ok(func() { call(v.Field(3).Elem().Method(0)) })        // .NamedT1.Y
    	badCall(func() { call(v.Field(3).Method(1)) })          // .NamedT1.y
    	badMethod(func() { call(v.Field(3).Elem().Method(3)) }) // .NamedT1.y
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 218.8K bytes
    - Viewed (0)
Back to top