1
Fork 0
GoBlogDemoPlugin/plugin.go

34 lines
522 B
Go

package plugin
import (
"fmt"
gogeouri "git.jlel.se/jlelse/go-geouri"
"go.goblog.app/app/pkgs/plugintypes"
)
func GetPlugin() plugintypes.Exec {
return &plugin{}
}
type plugin struct {
}
func (p *plugin) SetApp(_ plugintypes.App) {
// Ignore
}
func (*plugin) SetConfig(_ map[string]any) {
// Ignore
}
func (p *plugin) Exec() {
g, err := gogeouri.Parse("geo:37.786971,-122.399677")
if err != nil {
fmt.Println(err.Error())
return
}
fmt.Println("Lon: ", g.Longitude)
fmt.Println("Lat: ", g.Latitude)
}