github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/kbfs/kbfstool/common.go (about)

     1  // Copyright 2016 Keybase Inc. All rights reserved.
     2  // Use of this source code is governed by a BSD
     3  // license that can be found in the LICENSE file.
     4  
     5  package main
     6  
     7  import (
     8  	"fmt"
     9  	"os"
    10  )
    11  
    12  const (
    13  	topName     = "keybase"
    14  	publicName  = "public"
    15  	privateName = "private"
    16  )
    17  
    18  func byteCountStr(n int) string {
    19  	if n == 1 {
    20  		return "1 byte"
    21  	}
    22  	return fmt.Sprintf("%d bytes", n)
    23  }
    24  
    25  func printError(prefix string, err error) {
    26  	fmt.Fprintf(os.Stderr, "%s: %s\n", prefix, err)
    27  }