mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
chore: deprecate template create command in favor of template push (#11390)
This commit is contained in:
21
cli/cliui/deprecation.go
Normal file
21
cli/cliui/deprecation.go
Normal file
@ -0,0 +1,21 @@
|
||||
package cliui
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/coder/coder/v2/cli/clibase"
|
||||
"github.com/coder/pretty"
|
||||
)
|
||||
|
||||
func DeprecationWarning(message string) clibase.MiddlewareFunc {
|
||||
return func(next clibase.HandlerFunc) clibase.HandlerFunc {
|
||||
return func(i *clibase.Invocation) error {
|
||||
_, _ = fmt.Fprintln(i.Stdout, "\n"+pretty.Sprint(DefaultStyles.Wrap,
|
||||
pretty.Sprint(
|
||||
DefaultStyles.Warn,
|
||||
"DEPRECATION WARNING: This command will be removed in a future release."+"\n"+message+"\n"),
|
||||
))
|
||||
return next(i)
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user