go-shortcut
A golang library for creating shortcuts on Windows and Mac
(Mac version in progress...)
package main
import (
"github.com/go-ole/go-ole"
"github.com/justintaylor-dev/go-shortcut"
)
func main() {
src := "source.exe"
dir := "path/to/source"
dst := "path/to/dst.lnk"
args := ""
// Must initialize ole and defer the uninitialize for Windows
ole.CoInitialize(0)
defer ole.CoUninitialize()
MakeLink(src, dst, dir, args)
}
$ go get -u "github.com/justintaylor-dev/go-shortcut"