go-frameproto/writeframeinputtext.go

22 lines
615 B
Go
Raw Normal View History

2024-02-13 17:13:33 +00:00
package frameproto
import (
"io"
)
// WriteFrameInputText will write the HTML <meta/> element for the Frame-Protocol's (i.e., Farcaster Frame's) "fc:frame:input:text" name-value pair.
//
// For example, this call:
//
// var label string = "enter your username"
//
2024-02-13 18:03:14 +00:00
// frameproto.WriteFrameInputText(writer, label)
2024-02-13 17:13:33 +00:00
//
// Would write this HTML <meta/> element:
//
// <meta property="fc:frame:input:text" content="enter your username" />
2024-02-15 17:43:14 +00:00
func WriteFrameInputText(writer io.Writer, label string) error {
2024-02-13 17:13:33 +00:00
const property string = MetaPropertyFrameInputText
2024-02-15 17:43:14 +00:00
return writeMetaPropertyContent(writer, property, label)
2024-02-13 17:13:33 +00:00
}