Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for myprint1 (0.15 sec)

  1. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/printf/doc.go

    //
    // To enable printf checking on a function that is not found by this
    // analyzer's heuristics (for example, because control is obscured by
    // dynamic method calls), insert a bogus call:
    //
    //	func MyPrintf(format string, args ...any) {
    //		if false {
    //			_ = fmt.Sprintf(format, args...) // enable printf checking
    //		}
    //		...
    //	}
    //
    // # Specifying printf wrappers by flag
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  2. src/encoding/json/encode_test.go

    		makeInput: func() any {
    			type (
    				MyInt1 int
    				MyInt2 int
    				myInt  int
    				s2     struct {
    					MyInt2
    					myInt
    				}
    				s1 struct {
    					MyInt1
    					myInt
    					s2
    				}
    				S struct {
    					s1
    					myInt
    				}
    			)
    			return S{s1{1, 2, s2{3, 4}}, 6}
    		},
    		want: `{"MyInt1":1,"MyInt2":3}`,
    	}, {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 29.4K bytes
    - Viewed (0)
  3. src/cmd/cgo/doc.go

    	package main
    
    	// #include <stdio.h>
    	// #include <stdlib.h>
    	//
    	// static void myprint(char* s) {
    	//   printf("%s\n", s);
    	// }
    	import "C"
    	import "unsafe"
    
    	func main() {
    		cs := C.CString("Hello from stdio")
    		C.myprint(cs)
    		C.free(unsafe.Pointer(cs))
    	}
    
    A few special functions convert between Go and C types
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 17:12:16 UTC 2024
    - 42.2K bytes
    - Viewed (0)
  4. src/runtime/traceback.go

    		}
    		if off < startOffset {
    			return true
    		}
    		bits := *(*uint8)(add(liveInfo, uintptr(liveIdx)+uintptr(slotIdx/8)))
    		return bits&(1<<(slotIdx%8)) != 0
    	}
    
    	print1 := func(off, sz, slotIdx uint8) {
    		x := readUnaligned64(add(argp, uintptr(off)))
    		// mask out irrelevant bits
    		if sz < 8 {
    			shift := 64 - sz*8
    			if goarch.BigEndian {
    				x = x >> shift
    			} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 55.1K bytes
    - Viewed (0)
  5. src/internal/types/testdata/check/builtins0.go

    }
    
    func panic2() {
    	f1 := func() (x int) { return }
    	f2 := func() (x, y int) { return }
    	panic(f0 /* ERROR "used as value" */ ())
    	panic(f1())
    	panic(f2()) // ERROR "too many arguments"
    }
    
    func print1() {
    	print()
    	print(1)
    	print(1, 2)
    	print("foo")
    	print(2.718281828)
    	print(false)
    	print(1<<10)
    	print(1 << /* ERROR "constant shift overflow" */ 1000)
    	println(nil /* ERROR "untyped nil" */ )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 29.3K bytes
    - Viewed (0)
Back to top