chore: update goctl interface{} to any (#2819)
* chore: update goctl interface{} to any
* chore: update goctl interface{} to any
This commit is contained in:
@@ -125,27 +125,27 @@ func (i *ideaConsole) Info(format string, a ...any) {
|
||||
fmt.Println(msg)
|
||||
}
|
||||
|
||||
func (i *ideaConsole) Debug(format string, a ...interface{}) {
|
||||
func (i *ideaConsole) Debug(format string, a ...any) {
|
||||
msg := fmt.Sprintf(format, a...)
|
||||
fmt.Println(aurora.BrightCyan(msg))
|
||||
}
|
||||
|
||||
func (i *ideaConsole) Success(format string, a ...interface{}) {
|
||||
func (i *ideaConsole) Success(format string, a ...any) {
|
||||
msg := fmt.Sprintf(format, a...)
|
||||
fmt.Println("[SUCCESS]: ", msg)
|
||||
}
|
||||
|
||||
func (i *ideaConsole) Warning(format string, a ...interface{}) {
|
||||
func (i *ideaConsole) Warning(format string, a ...any) {
|
||||
msg := fmt.Sprintf(format, a...)
|
||||
fmt.Println("[WARNING]: ", msg)
|
||||
}
|
||||
|
||||
func (i *ideaConsole) Error(format string, a ...interface{}) {
|
||||
func (i *ideaConsole) Error(format string, a ...any) {
|
||||
msg := fmt.Sprintf(format, a...)
|
||||
fmt.Println("[ERROR]: ", msg)
|
||||
}
|
||||
|
||||
func (i *ideaConsole) Fatalln(format string, a ...interface{}) {
|
||||
func (i *ideaConsole) Fatalln(format string, a ...any) {
|
||||
i.Error(format, a...)
|
||||
os.Exit(1)
|
||||
}
|
||||
@@ -160,7 +160,7 @@ func (i *ideaConsole) Must(err error) {
|
||||
}
|
||||
}
|
||||
|
||||
func println(msg interface{}) {
|
||||
func println(msg any) {
|
||||
value, ok := msg.(aurora.Value)
|
||||
if !ok {
|
||||
fmt.Println(msg)
|
||||
@@ -177,27 +177,27 @@ func println(msg interface{}) {
|
||||
|
||||
var defaultConsole = &colorConsole{enable: true}
|
||||
|
||||
func Success(format string, a ...interface{}) {
|
||||
func Success(format string, a ...any) {
|
||||
defaultConsole.Success(format, a...)
|
||||
}
|
||||
|
||||
func Info(format string, a ...interface{}) {
|
||||
func Info(format string, a ...any) {
|
||||
defaultConsole.Info(format, a...)
|
||||
}
|
||||
|
||||
func Debug(format string, a ...interface{}) {
|
||||
func Debug(format string, a ...any) {
|
||||
defaultConsole.Debug(format, a...)
|
||||
}
|
||||
|
||||
func Warning(format string, a ...interface{}) {
|
||||
func Warning(format string, a ...any) {
|
||||
defaultConsole.Warning(format, a...)
|
||||
}
|
||||
|
||||
func Error(format string, a ...interface{}) {
|
||||
func Error(format string, a ...any) {
|
||||
defaultConsole.Error(format, a...)
|
||||
}
|
||||
|
||||
func Fatalln(format string, a ...interface{}) {
|
||||
func Fatalln(format string, a ...any) {
|
||||
defaultConsole.Fatalln(format, a...)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user