Skip to content

Commit 2bb7320

Browse files
authored
remove: disgo.OS (#366)
1 parent 44021d1 commit 2bb7320

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

disgo.go

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ package disgo
4848
import (
4949
"runtime"
5050
"runtime/debug"
51-
"strings"
5251

5352
"github.com/disgoorg/disgo/bot"
5453
"github.com/disgoorg/disgo/handlers"
@@ -68,9 +67,6 @@ var (
6867
Version = getVersion()
6968

7069
SemVersion = "semver:" + Version
71-
72-
// OS is the currently used OS
73-
OS = getOS()
7470
)
7571

7672
func getVersion() string {
@@ -85,17 +81,6 @@ func getVersion() string {
8581
return "unknown"
8682
}
8783

88-
func getOS() string {
89-
os := runtime.GOOS
90-
if strings.HasPrefix(os, "windows") {
91-
return "windows"
92-
}
93-
if strings.HasPrefix(os, "darwin") {
94-
return "darwin"
95-
}
96-
return "linux"
97-
}
98-
9984
// New creates a new bot.Client with the provided token & bot.ConfigOpt(s)
10085
func New(token string, opts ...bot.ConfigOpt) (bot.Client, error) {
10186
config := bot.DefaultConfig(handlers.GetGatewayHandlers(), handlers.GetHTTPServerHandler())
@@ -105,7 +90,7 @@ func New(token string, opts ...bot.ConfigOpt) (bot.Client, error) {
10590
config,
10691
handlers.DefaultGatewayEventHandlerFunc,
10792
handlers.DefaultHTTPServerEventHandlerFunc,
108-
OS,
93+
runtime.GOOS,
10994
Name,
11095
GitHub,
11196
Version,

0 commit comments

Comments
 (0)