Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindAllStringIndex ¶
FindAllStringIndex returns a slice with start and end positions for all embeds within the specified string.
func ReplaceEmbeds ¶
func ReplaceEmbeds(src string, replF func(args EmbeddedArgs) string) string
ReplaceEmbeds replaces all the embeds tags of the given text with the result of the calling function.
Types ¶
type EmbeddedArgs ¶
type EmbeddedArgs struct { // embedded file Name string Data []byte Alt string Typ string // shared link Download zkidentity.ShortID Filename string Size uint64 Cost uint64 // processed locally LocalFilename string // May be set externally, not on the link. Uid *clientintf.UserID }
func ParseEmbedArgs ¶
func ParseEmbedArgs(rawEmbedStr string) EmbeddedArgs
ParseEmbedArgs parses the given raw embed string, which should be --[]--, with the embed conted between brackets.
func (EmbeddedArgs) String ¶
func (args EmbeddedArgs) String() string
Click to show internal directories.
Click to hide internal directories.