Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for func (0.14 sec)

  1. src/cmd/cgo/internal/swig/testdata/callback/main.go

    }
    
    type GoCallback struct{}
    
    func (p *GoCallback) Run() string {
    	return "GoCallback.Run"
    }
    
    func testCall() {
    	c := NewCaller()
    	cb := NewCallback()
    
    	c.SetCallback(cb)
    	s := c.Call()
    	if s != "Callback::run" {
    		fatal("unexpected string from Call: %q", s)
    	}
    	c.DelCallback()
    }
    
    func testCallback() {
    	c := NewCaller()
    	cb := NewDirectorCallback(&GoCallback{})
    	c.SetCallback(cb)
    	s := c.Call()
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:07 GMT 2023
    - 1K bytes
    - Viewed (0)
  2. cmd/main.go

    	return strings.NewReader(banner.String())
    }
    
    func printMinIOVersion(c *cli.Context) {
    	io.Copy(c.App.Writer, versionBanner(c))
    }
    
    // Main main for minio server.
    func Main(args []string) {
    	// Set the minio app name.
    	appName := filepath.Base(args[0])
    
    	if env.Get("_MINIO_DEBUG_NO_EXIT", "") != "" {
    		freeze := func(_ int) {
    			// Infinite blocking op
    			<-make(chan struct{})
    		}
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Mar 09 03:07:08 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  3. misc/go_android_exec/main.go

    	if err != nil {
    		return 0, fmt.Errorf("adb exec-out %s: %v", args, err)
    	}
    	return exitCode, err2
    }
    
    func adb(args ...string) error {
    	if out, err := adbCmd(args...).CombinedOutput(); err != nil {
    		fmt.Fprintf(os.Stderr, "adb %s\n%s", strings.Join(args, " "), out)
    		return err
    	}
    	return nil
    }
    
    func adbCmd(args ...string) *exec.Cmd {
    	if flags := os.Getenv("GOANDROID_ADB_FLAGS"); flags != "" {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Aug 21 17:46:57 GMT 2023
    - 15.3K bytes
    - Viewed (0)
  4. src/cmd/addr2line/main.go

    	"strconv"
    	"strings"
    
    	"cmd/internal/objfile"
    )
    
    func printUsage(w *os.File) {
    	fmt.Fprintf(w, "usage: addr2line binary\n")
    	fmt.Fprintf(w, "reads addresses from standard input and writes two lines for each:\n")
    	fmt.Fprintf(w, "\tfunction name\n")
    	fmt.Fprintf(w, "\tfile:line\n")
    }
    
    func usage() {
    	printUsage(os.Stderr)
    	os.Exit(2)
    }
    
    func main() {
    	log.SetFlags(0)
    	log.SetPrefix("addr2line: ")
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Apr 11 16:34:30 GMT 2022
    - 2.3K bytes
    - Viewed (0)
  5. docs/debugging/pprofgoparser/main.go

    	goTime, less, margin time.Duration
    )
    
    func init() {
    	flag.DurationVar(&less, "less", 0, "goroutine waiting less than the specified time")
    	flag.DurationVar(&goTime, "time", 0, "goroutine waiting for exactly the specified time")
    	flag.DurationVar(&margin, "margin", 0, "margin time")
    	flag.StringVar(&searchText, "search", "", "Regex to search for a text in one goroutine stacktrace")
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Mar 06 11:43:16 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  6. src/cmd/cgo/internal/test/issue24161e2/main.go

    #endif
    */
    import "C"
    import (
    	"fmt"
    	"testing"
    )
    
    var _ C.CFStringRef
    
    func f1() {
    	C.SecKeyCreateSignature(0, C.kSecKeyAlgorithmECDSASignatureDigestX962SHA1, 0, nil)
    }
    
    func f2(e C.CFErrorRef) {
    	if desc := C.CFErrorCopyDescription(e); desc != 0 {
    		fmt.Println(desc)
    	}
    }
    
    Go
    - Registered: Tue Mar 26 11:13:08 GMT 2024
    - Last Modified: Fri May 12 12:00:02 GMT 2023
    - 1K bytes
    - Viewed (1)
  7. src/cmd/asm/main.go

    	"log"
    	"os"
    
    	"cmd/asm/internal/arch"
    	"cmd/asm/internal/asm"
    	"cmd/asm/internal/flags"
    	"cmd/asm/internal/lex"
    
    	"cmd/internal/bio"
    	"cmd/internal/obj"
    	"cmd/internal/objabi"
    )
    
    func main() {
    	log.SetFlags(0)
    	log.SetPrefix("asm: ")
    
    	buildcfg.Check()
    	GOARCH := buildcfg.GOARCH
    
    	flags.Parse()
    
    	architecture := arch.Set(GOARCH, *flags.Shared || *flags.Dynlink)
    	if architecture == nil {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 2.7K bytes
    - Viewed (0)
  8. istioctl/cmd/istioctl/main.go

    package main
    
    import (
    	"fmt"
    	"os"
    
    	// import all known client auth plugins
    	_ "k8s.io/client-go/plugin/pkg/client/auth"
    
    	"istio.io/istio/istioctl/cmd"
    	"istio.io/istio/pkg/log"
    )
    
    func main() {
    	if err := cmd.ConfigAndEnvProcessing(); err != nil {
    		fmt.Fprintf(os.Stderr, "Could not initialize: %v\n", err)
    		exitCode := cmd.GetExitCode(err)
    		os.Exit(exitCode)
    	}
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue May 23 17:08:31 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  9. docs/debugging/s3-verify/main.go

    	wg.Add(2)
    	go func() {
    		defer wg.Done()
    		srcSize, err := io.Copy(srcSha256, sobj)
    		if err != nil {
    			fmt.Printf("unreadable on source: %s (%s)\n", srcCtnt.Key, err)
    			sourceFailed = true
    		} else if srcSize != srcCtnt.Size {
    			fmt.Printf("unreadable on source - size differs upon read: %s\n", srcCtnt.Key)
    			sourceFailed = true
    		}
    	}()
    	go func() {
    		defer wg.Done()
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Jun 22 15:12:47 GMT 2022
    - 8.4K bytes
    - Viewed (0)
  10. docs/debugging/hash-set/main.go

    	"log"
    	"os"
    	"strings"
    
    	"github.com/dchest/siphash"
    	"github.com/google/uuid"
    )
    
    // hashes the key returning an integer based on the input algorithm.
    // This function currently supports
    // - SIPMOD
    func sipHashMod(key string, cardinality int, id [16]byte) int {
    	if cardinality <= 0 {
    		return -1
    	}
    	// use the faster version as per siphash docs
    	// https://github.com/dchest/siphash#usage
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 3.7K bytes
    - Viewed (0)
Back to top