github.com/pojntfx/hydrapp/hydrapp@v0.0.0-20240516002902-d08759d6ca9f/pkg/renderers/dmg/info.go (about)

     1  package dmg
     2  
     3  import (
     4  	_ "embed"
     5  
     6  	"github.com/pojntfx/hydrapp/hydrapp/pkg/renderers"
     7  )
     8  
     9  //go:embed info.plist
    10  var infoTemplate string
    11  
    12  type infoData struct {
    13  	AppID       string
    14  	AppName     string
    15  	AppReleases []renderers.Release
    16  }
    17  
    18  func NewInfoRenderer(
    19  	appID string,
    20  	appName string,
    21  	appReleases []renderers.Release,
    22  ) renderers.Renderer {
    23  	return renderers.NewRenderer(
    24  		"Info.plist",
    25  		infoTemplate,
    26  		infoData{appID, appName, appReleases},
    27  	)
    28  }