Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExampleMethodSet (0.21 sec)

  1. src/go/types/example_test.go

    	// .  .  .  block scope {
    	// .  .  .  .  block scope {
    	// .  .  .  .  .  var x int
    	// .  .  .  .  }
    	// .  .  .  }
    	// .  .  }
    	// .  }
    	// }
    }
    
    // ExampleMethodSet prints the method sets of various types.
    func ExampleMethodSet() {
    	// Parse a single source file.
    	const input = `
    package temperature
    import "fmt"
    type Celsius float64
    func (c Celsius) String() string  { return fmt.Sprintf("%g°C", c) }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 8.9K bytes
    - Viewed (0)
Back to top