Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for Sscanln (0.11 sec)

  1. istioctl/pkg/util/common.go

    }
    
    // Confirm waits for a user to confirm with the supplied message.
    func Confirm(msg string, writer io.Writer) bool {
    	for {
    		_, _ = fmt.Fprintf(writer, "%s ", msg)
    		var response string
    		_, err := fmt.Scanln(&response)
    		if err != nil {
    			return false
    		}
    		switch strings.ToUpper(response) {
    		case "Y", "YES":
    			return true
    		case "N", "NO":
    			return false
    		}
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 15 15:02:17 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  2. src/encoding/gob/example_encdec_test.go

    }
    
    // UnmarshalBinary modifies the receiver so it must take a pointer receiver.
    func (v *Vector) UnmarshalBinary(data []byte) error {
    	// A simple encoding: plain text.
    	b := bytes.NewBuffer(data)
    	_, err := fmt.Fscanln(b, &v.x, &v.y, &v.z)
    	return err
    }
    
    // This example transmits a value that implements the custom encoding and decoding methods.
    func Example_encodeDecode() {
    	var network bytes.Buffer // Stand-in for the network.
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 08 04:08:51 UTC 2014
    - 1.5K bytes
    - Viewed (0)
  3. operator/cmd/mesh/shared.go

    }
    
    // Confirm waits for a user to confirm with the supplied message.
    func Confirm(msg string, writer io.Writer) bool {
    	for {
    		_, _ = fmt.Fprintf(writer, "%s ", msg)
    		var response string
    		_, err := fmt.Scanln(&response)
    		if err != nil {
    			return false
    		}
    		switch strings.ToUpper(response) {
    		case "Y", "YES":
    			return true
    		case "N", "NO":
    			return false
    		}
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Mar 29 02:29:02 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/util/httpstream/spdy/connection_test.go

    	// regular messages.
    	in := "foo"
    	if _, err := fmt.Fprintln(clSPDYStream, in); err != nil {
    		t.Fatalf("client: error writing data to stream: %v", err)
    	}
    	var out string
    	if _, err := fmt.Fscanln(clSPDYStream, &out); err != nil {
    		t.Fatalf("client: error reading data from stream: %v", err)
    	}
    	if in != out {
    		t.Errorf("client: received data doesn't match sent data: got %q, want %q", out, in)
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 01 11:58:57 UTC 2023
    - 7.9K bytes
    - Viewed (0)
Back to top