Remove InfoMessage structs, we don't need to add this as API handling for json
This commit is contained in:
+1
-3
@@ -107,9 +107,7 @@ func runAccessCmd(ctx *cli.Context) {
|
||||
Error: iodine.New(err, nil),
|
||||
})
|
||||
}
|
||||
console.Infos(InfoMessage{
|
||||
Message: msg,
|
||||
})
|
||||
console.Infoln(msg)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-3
@@ -77,9 +77,7 @@ func runConfigCmd(ctx *cli.Context) {
|
||||
Error: iodine.New(err, nil),
|
||||
})
|
||||
}
|
||||
console.Infos(InfoMessage{
|
||||
Message: msg,
|
||||
})
|
||||
console.Infoln(msg)
|
||||
}
|
||||
|
||||
// saveConfig writes configuration data in json format to config file.
|
||||
|
||||
+1
-3
@@ -119,9 +119,7 @@ func runDiffCmd(ctx *cli.Context) {
|
||||
Error: iodine.New(diff.err, nil),
|
||||
})
|
||||
}
|
||||
console.Infos(InfoMessage{
|
||||
Message: diff.message,
|
||||
})
|
||||
console.Infoln(diff.message)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -96,9 +96,7 @@ func runMakeBucketCmd(ctx *cli.Context) {
|
||||
Error: iodine.New(err, nil),
|
||||
})
|
||||
}
|
||||
console.Infos(InfoMessage{
|
||||
Message: msg,
|
||||
})
|
||||
console.Infoln(msg)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -92,7 +92,7 @@ https://dl.minio.io:9000 for continuous updates`
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
console.Prints(InfoMessage{Message: msg})
|
||||
console.Println(msg)
|
||||
return "", nil
|
||||
}
|
||||
return "You are already running the most recent version of ‘mc’", nil
|
||||
@@ -119,6 +119,6 @@ func runUpdateCmd(ctx *cli.Context) {
|
||||
}
|
||||
// no msg do not print one
|
||||
if msg != "" {
|
||||
console.Infos(InfoMessage{Message: msg})
|
||||
console.Infoln(msg)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,16 +82,6 @@ func (c Content) String() string {
|
||||
return string(cBytes)
|
||||
}
|
||||
|
||||
// InfoMessage container for informational messages
|
||||
type InfoMessage struct {
|
||||
Message string `json:"info"`
|
||||
}
|
||||
|
||||
// String string printer for informational message
|
||||
func (i InfoMessage) String() string {
|
||||
return i.Message
|
||||
}
|
||||
|
||||
// CopyMessage container for file copy messages
|
||||
type CopyMessage struct {
|
||||
Source string `json:"source"`
|
||||
|
||||
+1
-3
@@ -108,9 +108,7 @@ func (s *sessionV2) String() string {
|
||||
}
|
||||
|
||||
func (s *sessionV2) Info() {
|
||||
console.Infos(InfoMessage{
|
||||
Message: "Session terminated. To resume session type ‘mc session resume " + s.SessionID + "’",
|
||||
})
|
||||
console.Infoln("Session terminated. To resume session type ‘mc session resume " + s.SessionID + "’")
|
||||
}
|
||||
|
||||
// NewDataReader provides reader interface to session data file.
|
||||
|
||||
Reference in New Issue
Block a user