Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for fmt (0.15 sec)

  1. cmd/main.go

    	banner := &strings.Builder{}
    	fmt.Fprintln(banner, color.Bold("%s version %s (commit-id=%s)", c.App.Name, c.App.Version, CommitID))
    	fmt.Fprintln(banner, color.Blue("Runtime:")+color.Bold(" %s %s/%s", runtime.Version(), runtime.GOOS, runtime.GOARCH))
    	fmt.Fprintln(banner, color.Blue("License:")+color.Bold(" GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>"))
    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)
  2. src/cmd/cgo/internal/swig/testdata/callback/main.go

    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()
    	}
    	println("OK")
    }
    
    func fatal(f string, args ...any) {
    	fmt.Fprintln(os.Stderr, fmt.Sprintf(f, args...))
    	os.Exit(1)
    }
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:07 GMT 2023
    - 1K bytes
    - Viewed (0)
  3. src/cmd/addr2line/main.go

    package main
    
    import (
    	"bufio"
    	"flag"
    	"fmt"
    	"log"
    	"os"
    	"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)
    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)
  4. misc/go_android_exec/main.go

    	exitCode, err2 := filter.Finish()
    
    	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
    }
    
    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)
  5. docs/debugging/pprofgoparser/main.go

    		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
    			}
    			if goTime == 0 || math.Abs(float64(t)-float64(goTime)) <= float64(margin) {
    				for _, stack := range stacks {
    					fmt.Println(stack)
    				}
    			}
    		}
    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

      static SecKeyAlgorithm foo(void){return NULL;}
    #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. istioctl/cmd/istioctl/main.go

    // limitations under the License.
    
    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)
    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)
  8. src/cmd/asm/main.go

    // Copyright 2014 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"bufio"
    	"flag"
    	"fmt"
    	"internal/buildcfg"
    	"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"
    )
    
    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)
  9. docs/debugging/s3-verify/main.go

    		if srcEOF {
    			fmt.Printf("only in target: %s\n", tgtCtnt.Key)
    			tgtCtnt, tgtOk = <-tgtCh
    			continue
    		}
    
    		// The same for target
    		if tgtEOF {
    			fmt.Printf("only in source: %s\n", srcCtnt.Key)
    			srcCtnt, srcOk = nextObject(srcCh)
    			continue
    		}
    
    		if srcCtnt.Key < tgtCtnt.Key {
    			fmt.Printf("only in source: %s\n", srcCtnt.Key)
    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/inspect/main.go

    	var privateKey []byte
    	if *keyHex == "" {
    		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
    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)
Back to top