Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for PointersToCompoundTypes (0.24 sec)

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

    	fmt.Printf("%0t", true)
    }
    
    // Issue 26486.
    func dbg(format string, args ...interface{}) {
    	if format == "" {
    		format = "%v"
    	}
    	fmt.Printf(format, args...)
    }
    
    func PointersToCompoundTypes() {
    	stringSlice := []string{"a", "b"}
    	fmt.Printf("%s", &stringSlice) // not an error
    
    	intSlice := []int{3, 4}
    	fmt.Printf("%s", &intSlice) // ERROR "Printf format %s has arg &intSlice of wrong type \*\[\]int"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 09 01:28:01 UTC 2023
    - 27.5K bytes
    - Viewed (0)
Back to top