Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xxdk-wasm
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
xxdk-wasm
Commits
d228bde2
Commit
d228bde2
authored
2 years ago
by
Jono Wenger
Browse files
Options
Downloads
Patches
Plain Diff
Rename client version functions and make GetVersion return the current xxDK WASM version
parent
9f176d2a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!60
Revert "Fail a test to be sure it works"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
main.go
+3
-2
3 additions, 2 deletions
main.go
wasm/version.go
+19
-7
19 additions, 7 deletions
wasm/version.go
with
22 additions
and
9 deletions
main.go
+
3
−
2
View file @
d228bde2
...
...
@@ -170,8 +170,9 @@ func main() {
// wasm/version.go
js
.
Global
()
.
Set
(
"GetVersion"
,
js
.
FuncOf
(
wasm
.
GetVersion
))
js
.
Global
()
.
Set
(
"GetGitVersion"
,
js
.
FuncOf
(
wasm
.
GetGitVersion
))
js
.
Global
()
.
Set
(
"GetDependencies"
,
js
.
FuncOf
(
wasm
.
GetDependencies
))
js
.
Global
()
.
Set
(
"GetClientVersion"
,
js
.
FuncOf
(
wasm
.
GetClientVersion
))
js
.
Global
()
.
Set
(
"GetClientGitVersion"
,
js
.
FuncOf
(
wasm
.
GetClientGitVersion
))
js
.
Global
()
.
Set
(
"GetClientDependencies"
,
js
.
FuncOf
(
wasm
.
GetClientDependencies
))
<-
make
(
chan
bool
)
os
.
Exit
(
0
)
...
...
This diff is collapsed.
Click to expand it.
wasm/version.go
+
19
−
7
View file @
d228bde2
...
...
@@ -11,29 +11,41 @@ package wasm
import
(
"gitlab.com/elixxir/client/bindings"
"gitlab.com/elixxir/xxdk-wasm/utils"
"syscall/js"
)
// GetVersion returns the
[xxdk.SEMVER]
.
// GetVersion returns the
current xxDK WASM semantic version
.
//
// Returns:
// -
V
ersion (string).
// -
Current v
ersion (string).
func
GetVersion
(
js
.
Value
,
[]
js
.
Value
)
interface
{}
{
return
utils
.
SEMVER
}
// GetClientVersion returns the current client xxDK semantic version
// ([xxdk.SEMVER]).
//
// Returns:
// - Current version (string).
func
GetClientVersion
(
js
.
Value
,
[]
js
.
Value
)
interface
{}
{
return
bindings
.
GetVersion
()
}
// GetGitVersion returns the [xxdk.GITVERSION].
// GetClientGitVersion returns the current client xxDK git version
// ([xxdk.GITVERSION]).
//
// Returns:
// - Git version (string).
func
GetGitVersion
(
js
.
Value
,
[]
js
.
Value
)
interface
{}
{
func
Get
Client
GitVersion
(
js
.
Value
,
[]
js
.
Value
)
interface
{}
{
return
bindings
.
GetGitVersion
()
}
// GetDependencies returns the [xxdk.DEPENDENCIES].
// GetClientDependencies returns the client's dependencies
// ([xxdk.DEPENDENCIES]).
//
// Returns:
// -
Git d
ependenc
ies
(string).
func
GetDependencies
(
js
.
Value
,
[]
js
.
Value
)
interface
{}
{
// -
D
ependenc
y list
(string).
func
Get
Client
Dependencies
(
js
.
Value
,
[]
js
.
Value
)
interface
{}
{
return
bindings
.
GetDependencies
()
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment