You've already forked img-proxy-url-generator
Fixed some shit
This commit is contained in:
45
interactive/params.go
Normal file
45
interactive/params.go
Normal file
@@ -0,0 +1,45 @@
|
||||
package interactive
|
||||
|
||||
import "github.com/charmbracelet/huh"
|
||||
|
||||
type Height struct {
|
||||
UrlParam
|
||||
paramValue string
|
||||
}
|
||||
|
||||
func (h Height) value() string {
|
||||
return "height"
|
||||
}
|
||||
|
||||
func (h Height) key() string {
|
||||
return "h"
|
||||
}
|
||||
|
||||
func (h Height) Input() *huh.Input {
|
||||
return huh.NewInput().
|
||||
Key(h.key()).
|
||||
Description("The height of the image.").
|
||||
Title("Height").
|
||||
Value(&h.paramValue)
|
||||
}
|
||||
|
||||
type Width struct {
|
||||
UrlParam
|
||||
paramValue string
|
||||
}
|
||||
|
||||
func (h Width) value() string {
|
||||
return "width"
|
||||
}
|
||||
|
||||
func (h Width) key() string {
|
||||
return "w"
|
||||
}
|
||||
|
||||
func (h Width) Input() *huh.Input {
|
||||
return huh.NewInput().
|
||||
Key(h.key()).
|
||||
Description("The width of the image.").
|
||||
Title("Width").
|
||||
Value(&h.paramValue)
|
||||
}
|
||||
Reference in New Issue
Block a user