Autostarter is a Go library that creates a shortcut to run automatically at startup and supports cross-compilation between Windows and Linux
This assumes you already have a working Go environment, if not please see this page first.
go get github.com/danieloliveira085/autostarter
Import the package into your project.
import "github.com/danieloliveira085/autostarter"
Construct a new autostart that can be used to access the main functions of the autostart created
a := autostarter.NewAutostart(
autostarter.Shortcut{
Name: "Shortcut name",
Exec: "Executable",
Args: []string{}, //Arguments, can be empty
StartIn: "Path where executable starts", //If empty, the root of the executable will be defined as directory
},
autostarter.DefaultIcon, //Icon, for a custom icon, use SetIcon()
)
See Documentation on GoDoc for more detailed information.