go-frameproto/appendframeinputtext.go

22 lines
623 B
Go
Raw Normal View History

2024-02-15 00:21:28 +00:00
package frameproto
// AppendFrameInputText will append 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 p []byte
//
// // ...
//
// var label string = "enter your username
//
// p = frameproto.AppendFrameInputText(p, label)
//
// Would append this HTML <meta/> element:
//
// <meta property="fc:frame:input:text" content="enter your username" />
2024-02-15 00:29:57 +00:00
func AppendFrameInputText(p []byte, label string) []byte {
2024-02-15 00:21:28 +00:00
const property string = MetaPropertyFrameInputText
2024-02-15 00:29:57 +00:00
return appendMetaPropertyContent(p, property, label)
2024-02-15 00:21:28 +00:00
}