You've already forked img-proxy-url-generator
We should get someone from Purdue to do this. They are the boilerplaters.
This commit is contained in:
42
interactive/params/min-width.go
Normal file
42
interactive/params/min-width.go
Normal file
@@ -0,0 +1,42 @@
|
||||
package params
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/charmbracelet/huh"
|
||||
)
|
||||
|
||||
type MinWidth struct {
|
||||
paramValue *string
|
||||
field *huh.Input
|
||||
}
|
||||
|
||||
func NewMinWidth() *MinWidth {
|
||||
mw := &MinWidth{
|
||||
paramValue: nil,
|
||||
field: huh.NewInput().
|
||||
Key("min-width").
|
||||
Description("The minimum width of the image.").
|
||||
Title("Min Width"),
|
||||
}
|
||||
|
||||
mw.paramValue = aws.String("")
|
||||
mw.field.Value(mw.paramValue)
|
||||
|
||||
return mw
|
||||
}
|
||||
|
||||
func (mw MinWidth) Display() string {
|
||||
return "min-width"
|
||||
}
|
||||
|
||||
func (mw MinWidth) Value() string {
|
||||
return *mw.paramValue
|
||||
}
|
||||
|
||||
func (mw MinWidth) Key() string {
|
||||
return "mw"
|
||||
}
|
||||
|
||||
func (mw MinWidth) Input() []huh.Field {
|
||||
return []huh.Field{mw.field}
|
||||
}
|
||||
Reference in New Issue
Block a user