mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-25 18:07:07 +09:00
refactor: use a more modern writing style to simplify code (#3834)
Signed-off-by: deepdring <deepdrink@icloud.com>
This commit is contained in:
@@ -55,7 +55,7 @@ func (i *InfoBuf) Close() {
|
||||
}
|
||||
|
||||
// Message sends a message to the user
|
||||
func (i *InfoBuf) Message(msg ...interface{}) {
|
||||
func (i *InfoBuf) Message(msg ...any) {
|
||||
// only display a new message if there isn't an active prompt
|
||||
// this is to prevent overwriting an existing prompt to the user
|
||||
if !i.HasPrompt {
|
||||
@@ -67,7 +67,7 @@ func (i *InfoBuf) Message(msg ...interface{}) {
|
||||
}
|
||||
|
||||
// GutterMessage displays a message and marks it as a gutter message
|
||||
func (i *InfoBuf) GutterMessage(msg ...interface{}) {
|
||||
func (i *InfoBuf) GutterMessage(msg ...any) {
|
||||
i.Message(msg...)
|
||||
i.HasGutter = true
|
||||
}
|
||||
@@ -79,7 +79,7 @@ func (i *InfoBuf) ClearGutter() {
|
||||
}
|
||||
|
||||
// Error sends an error message to the user
|
||||
func (i *InfoBuf) Error(msg ...interface{}) {
|
||||
func (i *InfoBuf) Error(msg ...any) {
|
||||
// only display a new message if there isn't an active prompt
|
||||
// this is to prevent overwriting an existing prompt to the user
|
||||
if !i.HasPrompt {
|
||||
|
||||
Reference in New Issue
Block a user