github.com/pojntfx/hydrapp/hydrapp@v0.0.0-20240516002902-d08759d6ca9f/pkg/renderers/deb/rules.go (about) 1 package deb 2 3 import ( 4 _ "embed" 5 "path/filepath" 6 7 "github.com/pojntfx/hydrapp/hydrapp/pkg/renderers" 8 ) 9 10 //go:embed rules 11 var rulesTemplate string 12 13 type rulesData struct { 14 AppID string 15 GoMain string 16 GoFlags string 17 GoGenerate string 18 } 19 20 func NewRulesRenderer( 21 appID string, 22 goMain string, 23 goFlags string, 24 goGenerate string, 25 ) renderers.Renderer { 26 return renderers.NewRenderer( 27 filepath.Join("debian", "rules"), 28 rulesTemplate, 29 rulesData{appID, goMain, goFlags, goGenerate}, 30 ) 31 }