mirror of
https://github.com/hanzoai/s3-cli.git
synced 2026-10-30 18:23:12 +00:00
Vendor the CLI helpers into pkg/, use hanzos3/go, rename the module to hanzoai/s3-cli, and gate the names in cmd/names_test.go. Claude-Session: https://claude.ai/code/session_011i2AG9nwpiKUCVxAdDzYuU
30 lines
867 B
Go
30 lines
867 B
Go
// Copyright 2010 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the https://golang.org/LICENSE file.
|
|
|
|
package colorjson
|
|
|
|
import (
|
|
"github.com/fatih/color"
|
|
"github.com/hanzoai/s3-cli/pkg/console"
|
|
)
|
|
|
|
const (
|
|
// FgDarkGray is the shell color code for dark gray. Needs to be followed by
|
|
// FgBlack to render dark gray
|
|
FgDarkGray = 1
|
|
jsonString = "jsonGreen"
|
|
jsonBool = "jsonRed"
|
|
jsonNum = "jsonRed"
|
|
jsonKey = "jsonBoldBlue"
|
|
jsonNull = "jsonBoldDarkGray"
|
|
)
|
|
|
|
func init() {
|
|
console.SetColor(jsonString, color.New(color.FgGreen))
|
|
console.SetColor(jsonBool, color.New(color.FgRed))
|
|
console.SetColor(jsonNum, color.New(color.FgRed))
|
|
console.SetColor(jsonKey, color.New(color.FgBlue, color.Bold))
|
|
console.SetColor(jsonNull, color.New(FgDarkGray, color.FgBlack, color.Bold))
|
|
}
|