go-frameproto/stringframe.go

25 lines
712 B
Go
Raw Normal View History

2024-02-15 12:49:04 +00:00
package frameproto
// StringFrame will return the HTML <meta/> element for the Frame-Protocol's (i.e., Farcaster Frame's) "fc:frame" name-value pair.
//
// For example, this call:
//
// var version string = "vNext"
//
// s = frameproto.StringFrame(version)
//
// Would return this HTML <meta/> element:
//
// <meta property="fc:frame" content="vNext" />
//
// Note that this package provides some constants to use with StringFrame.
// Namely: VersionVNext (for "vNext").
//
// Which in code would be used as:
//
// p = frameproto.StringFrame(p, frameproto.VersionVNext)
func StringFrame(version string) string {
const property string = MetaPropertyFrame
return stringMetaPropertyContent(property, version)
}