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:
41
interactive/params/zoom.go
Normal file
41
interactive/params/zoom.go
Normal file
@@ -0,0 +1,41 @@
|
||||
package params
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/charmbracelet/huh"
|
||||
)
|
||||
|
||||
type Zoom struct {
|
||||
zoom *string
|
||||
field huh.Field
|
||||
}
|
||||
|
||||
func NewZoom() *Zoom {
|
||||
z := &Zoom{
|
||||
zoom: aws.String(""),
|
||||
field: huh.NewInput().
|
||||
Key("z").
|
||||
Description("Percentage to zoom the image (1.4 == 140%) .").
|
||||
Title("Zoom"),
|
||||
}
|
||||
|
||||
z.field.(*huh.Input).Value(z.zoom)
|
||||
|
||||
return z
|
||||
}
|
||||
|
||||
func (z *Zoom) Value() string {
|
||||
return *z.zoom
|
||||
}
|
||||
|
||||
func (z *Zoom) Display() string {
|
||||
return "zoom"
|
||||
}
|
||||
|
||||
func (z *Zoom) Key() string {
|
||||
return "z"
|
||||
}
|
||||
|
||||
func (z *Zoom) Input() []huh.Field {
|
||||
return []huh.Field{z.field}
|
||||
}
|
||||
Reference in New Issue
Block a user