github.com/pojntfx/hydrapp/hydrapp@v0.0.0-20240516002902-d08759d6ca9f/pkg/renderers/xdg/desktop.go (about) 1 package xdg 2 3 import ( 4 _ "embed" 5 6 "github.com/pojntfx/hydrapp/hydrapp/pkg/renderers" 7 ) 8 9 //go:embed desktop.desktop 10 var desktopTemplate string 11 12 type desktopData struct { 13 AppID string 14 AppName string 15 AppDescription string 16 } 17 18 func NewDesktopRenderer( 19 appID string, 20 appName string, 21 appDescription string, 22 ) renderers.Renderer { 23 return renderers.NewRenderer(appID+".desktop", desktopTemplate, desktopData{appID, appName, appDescription}) 24 }