mirror of
https://github.com/foomo/keel.git
synced 2025-10-16 12:35:34 +00:00
20 lines
220 B
Go
20 lines
220 B
Go
package markdown
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
func Code(v string) string {
|
|
if v == "" {
|
|
return ""
|
|
}
|
|
return "`" + v + "`"
|
|
}
|
|
|
|
func String(v any) string {
|
|
if i, ok := v.(fmt.Stringer); ok {
|
|
return i.String()
|
|
}
|
|
return ""
|
|
}
|