TheMathemagicians/sevenkeys/cli/storage.go

37 lines
606 B
Go
Raw Normal View History

package cli
import (
"fmt"
2024-08-20 14:28:49 +00:00
"io"
"sevenkeys/database"
)
var (
selectedCardPrintingSearchLine string
copiesInserted int
)
func getInfoDisplay(info string) string {
if info == "" {
return "[EMPTY]"
}
return info
}
2024-08-20 14:28:49 +00:00
func showStorageInfo(w io.Writer, area database.StorageArea) {
fmt.Fprint(w, "Selected Storage Area: ")
if area.Name == "" { // TODO: Add a struct method to determine whether it is unset?
2024-08-20 14:28:49 +00:00
fmt.Fprint(w, "[None]\n")
return
}
fmt.Fprintf(w, "%s (%s)\n", area.Name, area.StorageType)
2024-08-20 14:28:49 +00:00
return
}
func showCopiesInserted() {
fmt.Println("Copies inserted:", copiesInserted)
}