Skip to content

Commit 49c5931

Browse files
contents/en/documents/steam: Init is error interface type not boolean (#46)
1 parent 26332aa commit 49c5931

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

contents/en/documents/steam.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ <h2>Steamworks SDK</h2>
99
<pre><code>package main
1010

1111
import (
12+
"fmt"
1213
"os"
1314

1415
"github.com/hajimehoshi/go-steamworks"
@@ -20,8 +21,8 @@ <h2>Steamworks SDK</h2>
2021
if steamworks.RestartAppIfNecessary(appID) {
2122
os.Exit(1)
2223
}
23-
if !steamworks.Init() {
24-
panic("steamworks.Init failed")
24+
if err := steamworks.Init(); err != nil {
25+
panic(fmt.Sprintf("steamworks.Init failed: %v", err))
2526
}
2627
}</code></pre>
2728
<p>Please note that this binding has not yet implemented most of the API. More features are planned for future updates.</p>

contents/ja/documents/steam.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ <h2>Steamworks SDK</h2>
99
<pre><code>package main
1010

1111
import (
12+
"fmt"
1213
"os"
1314

1415
"github.com/hajimehoshi/go-steamworks"
@@ -20,8 +21,8 @@ <h2>Steamworks SDK</h2>
2021
if steamworks.RestartAppIfNecessary(appID) {
2122
os.Exit(1)
2223
}
23-
if !steamworks.Init() {
24-
panic("steamworks.Init failed")
24+
if err := steamworks.Init(); err != nil {
25+
panic(fmt.Sprintf("steamworks.Init failed: %v", err))
2526
}
2627
}</code></pre>
2728
<p>なおこのバインディングはまだ API をほとんど実装していません。今後対応予定です。</p>

0 commit comments

Comments
 (0)