Skip to content

Commit

Permalink
updated example
Browse files Browse the repository at this point in the history
  • Loading branch information
JensvandeWiel committed Aug 3, 2023
1 parent 28bdb89 commit 51074c8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions examples/install-rustserver/main.go
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit 51074c8

Please sign in to comment.