Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for Sscanln (0.1 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. 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)
  3. 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