-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove go-platform dependency (#44)
Remove `go-platform` npm dependency due to no longer maintain. Migrate it into `go-platform.js` and require it in `download.js` Fixes #40 Co-authored-by: Alex Potsides <alex@achingbrain.net>
- Loading branch information
1 parent
269d83a
commit 8b0e3d9
Showing
3 changed files
with
34 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
'use strict' | ||
|
||
function getGoOs () { | ||
switch (process.platform) { | ||
case "sunos": | ||
return "solaris" | ||
case "win32": | ||
return "windows" | ||
} | ||
|
||
return process.platform | ||
} | ||
|
||
function getGoArch () { | ||
switch (process.arch) { | ||
case "ia32": | ||
return "386" | ||
case "x64": | ||
return "amd64" | ||
case "arm": | ||
return "arm" | ||
case "arm64": | ||
return "arm64" | ||
} | ||
|
||
return process.arch | ||
} | ||
|
||
|
||
module.exports = { | ||
GOOS: getGoOs(), | ||
GOARCH: getGoArch() | ||
} |