// SayHello implements helloworld.GreeterServer
491491
func (s *hwServer) SayHello(ctx context.Context, in *hwpb.HelloRequest) (*hwpb.HelloReply, error) {
	return &hwpb.HelloReply{Message: "Hello " + in.Name}, nil
}
503297
func (b *IrcBot) Say(channel string, text string) {
	msg := NewIrcMsg()
	msg.Command = "PRIVMSG"
	msg.CmdParams = []string{channel}
	msg.Trailing = []string{":", text}

	b.ChOut <- msg
}
910858
func (c *Conn) SayHello(newSigAls []SignatureAndHash) (cipherID, curveType uint16, curveID CurveID, version uint16, certs [][]byte, err error) {
	// Set the supported signatures and hashes to the set `newSigAls`
	supportedSignatureAlgorithms := make([]signatureAndHash, len(newSigAls))
	for i := range newSigAls {
		supportedSignatureAlgorithms[i] = newSigAls[i].internal()
	}

	hello := &clientHelloMsg{
		vers:                c.config.maxVersion(),
		compressionMethods:  []uint8{compressionNone},
		random:              make([]byte, 32),
		ocspStapling:        true,
		serverName:          c.config.ServerName,
		supportedCurves:     c.config.curvePreferences(),
		supportedPoints:     []uint8{pointFormatUncompressed},
		nextProtoNeg:        len(c.config.NextProtos) > 0,
		secureRenegotiation: true,
		cipherSuites:        c.config.cipherSuites(),
		signatureAndHashes:  supportedSignatureAlgorithms,
	}
	serverHello, err := c.sayHello(hello)
	if err != nil {
		return
	}
	// Prime the connection, if necessary, for key
	// exchange messages by reading off the certificate
	// message and, if necessary, the OCSP stapling
	// message
	var msg interface{}
	msg, err = c.readHandshake()
	if err != nil {
		return
	}
	certMsg, ok := msg.(*certificateMsg)
	if !ok || len(certMsg.certificates) == 0 {
		err = unexpectedMessageError(certMsg, msg)
		return
	}
	certs = certMsg.certificates

	if serverHello.ocspStapling {
		msg, err = c.readHandshake()
		if err != nil {
			return
		}
		certStatusMsg, ok := msg.(*certificateStatusMsg)
		if !ok {
			err = unexpectedMessageError(certStatusMsg, msg)
			return
		}
	}

	if CipherSuites[serverHello.cipherSuite].EllipticCurve {

		var skx *serverKeyExchangeMsg
		skx, err = c.exchangeKeys()
		if err != nil {
			return
		}
		if skx.raw[0] != typeServerKeyExchange {
			err = unexpectedMessageError(skx, msg)
			return
		}
		if len(skx.key) < 4 {
			err = unexpectedMessageError(skx, msg)
			return
		}
		curveType = uint16(skx.key[0])
		// If we have a named curve, report which one it is.
		if curveType == 3 {
			curveID = CurveID(skx.key[1])<<8 | CurveID(skx.key[2])
		}
	}
	cipherID, version = serverHello.cipherSuite, serverHello.vers

	return
}
620984
func (p *provisionee) Hello2(ctx context.Context, arg keybase1.Hello2Arg) (res keybase1.Hello2Res, err error) {
	close(p.start)
	res, err = p.arg.Provisionee.HandleHello2(ctx, arg)
	if err != nil {
		p.done <- err
	}
	return res, err
}
83559
func Say(x int, y int, text string) {
	pos := x
	for _, r := range text {
		termbox.SetCell(pos, y, r, TEXTCOLOR, BG)
		pos++
	}
}
318149
func conversationLoop(isGroup bool) {
	for {
		message := readLine(fmt.Sprintf("%s>", blue))
		if message == "" {
			continue
		}

		err := sendMessage(isGroup, to, message)

		if err != nil {
			log.Println(err)
		}
	}
}
896082
func (s *Session) Ask(text string) (output string, err error) {

	s.Text = text

	params, err := json.Marshal(s)
	if err != nil {
		return
	}

	response, err := http.Post(askURL, "application/json", bytes.NewBuffer(params))
	if err != nil {
		return
	}

	body, err := ioutil.ReadAll(response.Body)
	if err != nil {
		return
	}

	m := map[string]string{}
	err = json.Unmarshal([]byte(body), &m)
	if err != nil {
		return
	}

	if m["status"] != "success" {
		err = fmt.Errorf(m["status"])
		return
	}

	// return the bots asnwer.
	return m["response"], nil
}
881839
func (l *Log) SayAs(name string, format string, args ...interface{}) {
	l.output(l.quiet, &line{name, l.format(true, say, format, args), l})
}
515459
func (conn *Conn) Hello() error {
	var s string
	err := conn.busObj.Call("org.freedesktop.DBus.Hello", 0).Store(&s)
	if err != nil {
		return err
	}
	conn.names.acquireUniqueConnectionName(s)
	return nil
}
840031
func greet(c cli.Command) {
	greeting := c.Param("greeting")
	str := fmt.Sprintf("%s", greeting)
	str = styleByFlags(str, c)
	c.Println(str)
}
861490
func AskToProceed(message string) bool {
	for {
		fmt.Print(message)
		reader := bufio.NewReader(os.Stdin)
		proceedRaw, err := reader.ReadString('\n')
		errors.CheckError(err)
		switch strings.ToLower(strings.TrimSpace(proceedRaw)) {
		case "y", "yes":
			return true
		case "n", "no":
			return false
		}
	}
}
404265
func (a Actor) Prompt(message string, checks ...InputCheck) (string, error) {
	input, err := a.prompt(message + ": ")
	if err != nil {
		return "", err
	}
	err = runChecks(input, checks...)
	if err != nil {
		return "", err
	}
	return input, nil
}
425740
func askCredentials(c *context.Context, status int, text string) {
	c.Resp.Header().Set("WWW-Authenticate", "Basic realm=\".\"")
	c.HandleText(status, text)
}
498303
func (s *Session) VoiceICE() (st *VoiceICE, err error) {

	body, err := s.RequestWithBucketID("GET", EndpointVoiceIce, nil, EndpointVoiceIce)
	if err != nil {
		return
	}

	err = unmarshal(body, &st)
	return
}
521823
func promptPass(ctx context.Context, prompt string) (string, error) {
	if !ctxutil.IsTerminal(ctx) {
		return "", nil
	}

	return AskForString(ctx, prompt, "")
}
1175896
func Ask(question string) (bool, error) {
	term, err := NewTerminal()
	if err != nil {
		return false, err
	}
	defer term.Close()

	return term.Ask(question)
}
584439
func askToTrustHost(addr, algo, fingerprint string) bool {
	var ans string

	fmt.Fprintf(os.Stderr, promptToTrustHost, addr, algo, fingerprint)
	fmt.Scanf("%s\n", &ans)

	ans = strings.ToLower(ans)
	if ans != "yes" && ans != "y" {
		return false
	}

	return true
}