diff --git a/examples/install-rustserver/main.go b/examples/install-rustserver/main.go index dbc77d5..1dbce9c 100644 --- a/examples/install-rustserver/main.go +++ b/examples/install-rustserver/main.go @@ -1,15 +1,18 @@ package main -import "github.com/jensvandewiel/gosteamcmd" +import ( + "github.com/jensvandewiel/gosteamcmd" + "os" +) func main() { //this code follows the steps of: https://www.rustafied.com/how-to-host-your-own-rust-server - cmd := gosteamcmd.New() - cmd.Prompts = append(cmd.Prompts, gosteamcmd.ForceInstallDir("c:\\rustserver\\")) + cmd := gosteamcmd.New(os.Stdout) + cmd.Prompts = append(cmd.Prompts, gosteamcmd.ForceInstallDir("c:\\obamaserver\\")) cmd.Prompts = append(cmd.Prompts, gosteamcmd.Login("", "")) cmd.Prompts = append(cmd.Prompts, gosteamcmd.AppUpdate(258550, "", false)) //running it headless means it will not output anything - err := cmd.RunHeadless() + err := cmd.Run() if err != nil { panic(err)