// printKeyStatus prints the KeyStatus response from the API.
166964
func printKeyStatus(ks *api.KeyStatus) string {
	return columnOutput([]string{
		fmt.Sprintf("Key Term | %d", ks.Term),
		fmt.Sprintf("Install Time | %s", ks.InstallTime.UTC().Format(time.RFC822)),
	}, nil)
}
646603
func (c *SCSICmd) RespondStatus(status byte) SCSIResponse {
	return SCSIResponse{
		id:     c.id,
		status: status,
	}
}
1052925
func (resp *Response) NotStatus(status int, msg ...interface{}) *Response {
	resp.assertion.NotEqual(resp.resp.StatusCode, status, msg...)

	return resp
}
462095
func printStatusErr(e error) {
	fmt.Println("Checking status of " + AppName + " failed")
	fmt.Println("Details:", e.Error())
}
174428
func (w *Wrapper) PrintStatus(status status.Status) {
	w.PrintColor(statusColors[status], status)
}
17458
func (h *Handler) handleGetStatus(w http.ResponseWriter, r *http.Request) {
	if !validHeaderAcceptJSON(r.Header) {
		http.Error(w, "JSON only acceptable response", http.StatusNotAcceptable)
		return
	}
	status := getStatusResponse{
		State:   h.api.State(),
		Nodes:   h.api.Hosts(r.Context()),
		LocalID: h.api.Node().ID,
	}
	if err := json.NewEncoder(w).Encode(status); err != nil {
		h.logger.Printf("write status response error: %s", err)
	}
}
89970
func (this *SubscribeResponse) PrintResults() {

	fmt.Println("Response Status: ", this.Status)
	fmt.Println("Response Code  : ", this.StatusCode)
	if this.StatusCode != 200 {
		fmt.Println("Error          : ", this.Error)
	}

}
528860
func (e *Endpoint) policyStatus() models.EndpointPolicyEnabled {
	policyEnabled := models.EndpointPolicyEnabledNone
	switch {
	case e.realizedPolicy.IngressPolicyEnabled && e.realizedPolicy.EgressPolicyEnabled:
		policyEnabled = models.EndpointPolicyEnabledBoth
	case e.realizedPolicy.IngressPolicyEnabled:
		policyEnabled = models.EndpointPolicyEnabledIngress
	case e.realizedPolicy.EgressPolicyEnabled:
		policyEnabled = models.EndpointPolicyEnabledEgress
	}
	return policyEnabled
}
627414
func (e ServerErrorThrottle) ToStatus() (s keybase1.Status) {
	s.Code = StatusCodeServerErrorThrottle
	s.Name = "THROTTLE"
	s.Desc = e.Err.Error()
	if e.SuggestedRetryIn != nil {
		s.Fields = append(s.Fields, keybase1.StringKVPair{
			Key:   "suggestedRetryInMS",
			Value: strconv.FormatInt(int64((*e.SuggestedRetryIn)/time.Millisecond), 10),
		})
	}
	return
}
178338
func (c RekeyClient) ShowPendingRekeyStatus(ctx context.Context, sessionID int) (err error) {
	__arg := ShowPendingRekeyStatusArg{SessionID: sessionID}
	err = c.Cli.Call(ctx, "keybase.1.rekey.showPendingRekeyStatus", []interface{}{__arg}, nil)
	return
}
1274500
func (e ServerErrorClassicTLFDoesNotExist) ToStatus() (s keybase1.Status) {
	s.Code = StatusCodeServerErrorClassicTLFDoesNotExist
	s.Name = "CLASSIC_TLF_DOES_NOT_EXIST"
	s.Desc = e.Error()
	return
}
183073
func (s *StatusBar) PrintStatus(msg string, clearDelay time.Duration) {
	if pdebug.Enabled {
		g := pdebug.Marker("StatusBar.PrintStatus")
		defer g.End()
	}

	s.stopTimer()

	location := s.AnchorPosition()

	w, _ := s.screen.Size()
	width := runewidth.StringWidth(msg)
	for width > w {
		_, rw := utf8.DecodeRuneInString(msg)
		width = width - rw
		msg = msg[rw:]
	}

	var pad []byte
	if w > width {
		pad = make([]byte, w-width)
		for i := 0; i < w-width; i++ {
			pad[i] = ' '
		}
	}

	fgAttr := s.styles.Basic.fg
	bgAttr := s.styles.Basic.bg

	if w > width {
		s.screen.Print(PrintArgs{
			Y:   location,
			Fg:  fgAttr,
			Bg:  bgAttr,
			Msg: string(pad),
		})
	}

	if width > 0 {
		s.screen.Print(PrintArgs{
			X:   int(w - width),
			Y:   location,
			Fg:  fgAttr | termbox.AttrReverse | termbox.AttrBold | termbox.AttrReverse,
			Bg:  bgAttr | termbox.AttrReverse,
			Msg: msg,
		})
	}
	s.screen.Flush()

	// if everything is successful AND the clearDelay timer is specified,
	// then set a timer to clear the status
	if clearDelay != 0 {
		s.setClearTimer(time.AfterFunc(clearDelay, func() {
			s.PrintStatus("", 0)
		}))
	}
}
678334
func (c KeyExistsError) ToStatus() (s keybase1.Status) {
	s.Code = SCKeyInUse
	s.Name = "KEY_IN_USE"
	if c.Key != nil {
		s.Desc = c.Key.String()
	}
	return
}
381376
func (e ServerErrorCannotReadFinalizedTLF) ToStatus() (s keybase1.Status) {
	s.Code = StatusCodeServerErrorCannotReadFinalizedTLF
	s.Name = "CANNOT_READ_FINALIZED_TLF"
	s.Desc = e.Error()
	return
}
158141
func (db *GoLevelDB) Print() {
	str, _ := db.db.GetProperty("leveldb.stats")
	fmt.Printf("%v\n", str)

	itr := db.db.NewIterator(nil, nil)
	for itr.Next() {
		key := itr.Key()
		value := itr.Value()
		fmt.Printf("[%X]:\t[%X]\n", key, value)
	}
}
875565
func (e ServerErrorBlockNonExistent) ToStatus() (s keybase1.Status) {
	s.Code = StatusCodeServerErrorBlockNonExistent
	s.Name = "BLOCK_NONEXISTENT"
	s.Desc = e.Msg
	return
}
1096734
func (k *KeybaseServiceBase) NotifySyncStatus(ctx context.Context,
	status *keybase1.FSPathSyncStatus) error {
	// Reduce log spam by not repeating log lines for
	// notifications with the same pathname.
	//
	// TODO: Only do this in debug mode.
	func() {
		k.lastNotificationFilenameLock.Lock()
		defer k.lastNotificationFilenameLock.Unlock()
		if status.Path != k.lastSyncNotificationPath {
			k.lastSyncNotificationPath = status.Path
			k.log.CDebugf(ctx, "Sending notification for %s", status.Path)
		}
	}()
	return k.kbfsClient.FSSyncEvent(ctx, *status)
}