Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 2,159 for fprint (0.14 sec)

  1. src/cmd/pprof/readlineui.go

    // For line-based UI, PrintErr writes to standard error.
    func (r *readlineUI) PrintErr(args ...any) {
    	r.print(true, args...)
    }
    
    func (r *readlineUI) print(withColor bool, args ...any) {
    	text := fmt.Sprint(args...)
    	if !strings.HasSuffix(text, "\n") {
    		text += "\n"
    	}
    	if withColor {
    		text = colorize(text)
    	}
    	fmt.Fprint(r.term, text)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 30 18:10:36 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/plugin/pkg/audit/log/backend.go

    	default:
    		audit.HandlePluginError(PluginName, fmt.Errorf("log format %q is not in list of known formats (%s)",
    			b.format, strings.Join(AllowedFormats, ",")), ev)
    		return false
    	}
    	if _, err := fmt.Fprint(b.out, line); err != nil {
    		audit.HandlePluginError(PluginName, err, ev)
    		return false
    	}
    	return true
    }
    
    func (b *backend) Run(stopCh <-chan struct{}) error {
    	return nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 03 14:38:47 UTC 2019
    - 2.4K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/test/testdata/gen/arithConstGen.go

    	case "int16":
    		ans = int64(int16(ans))
    	case "int8":
    		ans = int64(int8(ans))
    	}
    	return fmt.Sprintf("%d", ans)
    }
    
    func main() {
    	w := new(bytes.Buffer)
    	fmt.Fprintf(w, "// Code generated by gen/arithConstGen.go. DO NOT EDIT.\n\n")
    	fmt.Fprintf(w, "package main;\n")
    	fmt.Fprintf(w, "import \"testing\"\n")
    
    	fncCnst1 := template.Must(template.New("fnc").Parse(
    		`//go:noinline
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 20 02:13:02 UTC 2022
    - 8.3K bytes
    - Viewed (0)
  4. staging/src/k8s.io/cli-runtime/pkg/printers/yaml.go

    		return fmt.Errorf("missing apiVersion or kind; try GetObjectKind().SetGroupVersionKind() if you know the type")
    	}
    
    	output, err := yaml.Marshal(obj)
    	if err != nil {
    		return err
    	}
    	_, err = fmt.Fprint(w, string(output))
    	return err
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 02 14:15:25 UTC 2022
    - 2.5K bytes
    - Viewed (0)
  5. src/fmt/print.go

    // It returns the number of bytes written and any write error encountered.
    func Print(a ...any) (n int, err error) {
    	return Fprint(os.Stdout, a...)
    }
    
    // Sprint formats using the default formats for its operands and returns the resulting string.
    // Spaces are added between operands when neither is a string.
    func Sprint(a ...any) string {
    	p := newPrinter()
    	p.doPrint(a)
    	s := string(p.buf)
    	p.free()
    	return s
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:22:43 UTC 2024
    - 31.8K bytes
    - Viewed (0)
  6. pkg/client/tests/remotecommand_test.go

    	if len(ex.errorData) > 0 {
    		return errors.New(ex.errorData)
    	}
    
    	if len(ex.stdoutData) > 0 {
    		for i := 0; i < ex.messageCount; i++ {
    			fmt.Fprint(out, ex.stdoutData)
    		}
    	}
    
    	if len(ex.stderrData) > 0 {
    		for i := 0; i < ex.messageCount; i++ {
    			fmt.Fprint(err, ex.stderrData)
    		}
    	}
    
    	if ex.expectStdin {
    		io.Copy(&ex.stdinReceived, in)
    	}
    
    	return nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jun 05 06:08:18 UTC 2023
    - 10.2K bytes
    - Viewed (0)
  7. cmd/kubeadm/app/util/error.go

    	ErrExit = errors.New("exit")
    )
    
    // fatal prints the message if set and then exits.
    func fatal(msg string, code int) {
    	if len(msg) > 0 {
    		// add newline if needed
    		if !strings.HasSuffix(msg, "\n") {
    			msg += "\n"
    		}
    
    		fmt.Fprint(os.Stderr, msg)
    	}
    	os.Exit(code)
    }
    
    // CheckErr prints a user friendly error to STDERR and exits with a non-zero
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 25 16:35:10 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/server/healthz/healthz.go

    		w.Header().Set("Content-Type", "text/plain; charset=utf-8")
    		w.Header().Set("X-Content-Type-Options", "nosniff")
    		if _, found := r.URL.Query()["verbose"]; !found {
    			fmt.Fprint(w, "ok")
    			return
    		}
    
    		individualCheckOutput.WriteTo(w)
    		fmt.Fprintf(w, "%s check passed\n", name)
    	}
    }
    
    // adaptCheckToHandler returns an http.HandlerFunc that serves the provided checks.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 27 19:11:24 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  9. istioctl/pkg/authz/listener.go

    	parts := re.FindStringSubmatch(name)
    	if len(parts) != 4 {
    		log.Errorf("failed to parse policy name: %s", name)
    		return "", ""
    	}
    	return fmt.Sprintf("%s.%s", parts[2], parts[1]), parts[3]
    }
    
    // Print prints the AuthorizationPolicy in the listener.
    func Print(writer io.Writer, listeners []*listener.Listener) {
    	parsedListeners := parse(listeners)
    	if parsedListeners == nil {
    		return
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Sep 11 15:29:30 UTC 2023
    - 6K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/syntax/printer_test.go

    	"testing"
    )
    
    func TestPrint(t *testing.T) {
    	if testing.Short() {
    		t.Skip("skipping test in short mode")
    	}
    
    	ast, _ := ParseFile(*src_, func(err error) { t.Error(err) }, nil, 0)
    
    	if ast != nil {
    		Fprint(testOut(), ast, LineForm)
    		fmt.Println()
    	}
    }
    
    type shortBuffer struct {
    	buf []byte
    }
    
    func (w *shortBuffer) Write(data []byte) (n int, err error) {
    	w.buf = append(w.buf, data...)
    	n = len(data)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jul 31 17:08:18 UTC 2023
    - 7.6K bytes
    - Viewed (0)
Back to top