Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for Len (0.18 sec)

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

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"fmt"
    	"os"
    )
    
    func main() {
    	if len(os.Args) != 2 {
    		fatal("usage: callback testname")
    	}
    	switch os.Args[1] {
    	default:
    		fatal("unknown test %q", os.Args[1])
    	case "Call":
    		testCall()
    	case "Callback":
    		testCallback()
    	}
    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

    		// Suggest other close commands - allow missed, wrongly added and
    		// even transposed characters
    		for _, value := range commandsTree.Walk(commandsTree.Root()) {
    			if sort.SearchStrings(closestCommands, value) < len(closestCommands) {
    				continue
    			}
    			// 2 is arbitrary and represents the max
    			// allowed number of typed errors
    			if words.DamerauLevenshteinDistance(command, value) < 2 {
    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

    	out, err := cmd.Output()
    	if err != nil {
    		if ee, ok := err.(*exec.ExitError); ok && len(ee.Stderr) > 0 {
    			return errorf("%v: %s", cmd, ee.Stderr)
    		}
    		return errorf("%v: %w", cmd, err)
    	}
    
    	parts := strings.SplitN(string(bytes.TrimSpace(out)), ":", 4)
    	if len(parts) < 2 {
    		return errorf("%v: missing ':' in output: %q", cmd, out)
    	}
    	importPath = parts[0]
    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

    }
    
    func usage() {
    	printUsage(os.Stderr)
    	os.Exit(2)
    }
    
    func main() {
    	log.SetFlags(0)
    	log.SetPrefix("addr2line: ")
    
    	// pprof expects this behavior when checking for addr2line
    	if len(os.Args) > 1 && os.Args[1] == "--help" {
    		printUsage(os.Stdout)
    		os.Exit(0)
    	}
    
    	flag.Usage = usage
    	flag.Parse()
    	if flag.NArg() != 1 {
    		usage()
    	}
    
    	f, err := objfile.Open(flag.Arg(0))
    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

    			continue
    		}
    		r, err := parseGoroutineType2(arg)
    		if err != nil {
    			log.Fatal(err)
    		}
    
    		profFName := path.Base(arg)
    		fmt.Println(strings.Repeat("=", len(profFName)))
    		fmt.Println(profFName)
    		fmt.Println(strings.Repeat("=", len(profFName)))
    		fmt.Println("")
    
    		for t, stacks := range r {
    			if less != 0 && t >= less {
    				continue
    			}
    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. docs/debugging/inspect/main.go

    		if b, err := os.ReadFile(*privKeyPath); err == nil {
    			privateKey = b
    			fmt.Println("Using private key from", *privKeyPath)
    		}
    
    		// Prompt for decryption key if no --key or --private-key are provided
    		if len(privateKey) == 0 {
    			reader := bufio.NewReader(os.Stdin)
    			fmt.Print("Enter Decryption Key: ")
    
    			text, _ := reader.ReadString('\n')
    			// convert CRLF to LF
    			*keyHex = strings.ReplaceAll(text, "\n", "")
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 11 21:22:47 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  7. docs/debugging/hash-set/main.go

    			set := sipHashMod(prefix+object, setCount, id)
    			distrib[set] = append(distrib[set], prefix+object)
    		}
    		for set, files := range distrib {
    			fmt.Println("Set:", set+1, "Objects:", len(files))
    			if !verbose {
    				continue
    			}
    			for _, s := range files {
    				fmt.Printf("\t%s\n", s)
    			}
    		}
    		os.Exit(0)
    	}
    
    	if object == "" {
    		log.Fatalln("object name is mandatory")
    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)
  8. docs/debugging/xl-meta/main.go

    func (x xlMetaInlineData) afterVersion() []byte {
    	if len(x) == 0 {
    		return x
    	}
    	return x[1:]
    }
    
    // versionOK returns whether the version is ok.
    func (x xlMetaInlineData) versionOK() bool {
    	if len(x) == 0 {
    		return true
    	}
    	return x[0] > 0 && x[0] <= xlMetaInlineDataVer
    }
    
    func (x xlMetaInlineData) json() ([]byte, error) {
    	if len(x) == 0 {
    		return []byte("{}"), nil
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Apr 24 17:56:22 GMT 2024
    - 20.2K bytes
    - Viewed (1)
  9. docs/debugging/reorder-disks/main.go

    	localDisks, err := filterLocalDisks(node, args)
    	if err != nil {
    		log.Fatal(err)
    	}
    
    	if len(localDisks) == 0 {
    		log.Fatal("Fix --local-node-name or/and --args to select local disks.")
    	}
    
    	format, err := getFormatJSON(localDisks[0].path)
    	if err != nil {
    		log.Fatal(err)
    	}
    
    	setSize := len(format.XL.Sets[0])
    
    	expectedDisksName := make(map[string]string)
    	actualDisksName := make(map[string]string)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  10. docs/debugging/s3-check-md5/main.go

    				log.Println("SKIPPED: encrypted with SSE-KMS do not have md5sum as ETag:", objFullPath(object))
    				continue
    			}
    			parts := 1
    			multipart := false
    			s := strings.Split(object.ETag, "-")
    			switch len(s) {
    			case 1:
    				// nothing to do
    			case 2:
    				if p, err := strconv.Atoi(s[1]); err == nil {
    					parts = p
    				} else {
    					log.Println("FAILED: ETAG of", objFullPath(object), "has a wrong format:", err)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Feb 17 01:15:57 GMT 2024
    - 6.3K bytes
    - Viewed (0)
Back to top