Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xx-coin-game-ui
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
archives
xx-coin-game-ui
Commits
160601e4
Commit
160601e4
authored
4 years ago
by
Jono Wenger
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'origin/clientIntegration' into clientIntegration
# Conflicts: # main.go
parents
c34d64fd
aa004776
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
client.go
+20
-0
20 additions, 0 deletions
client.go
main.go
+9
-5
9 additions, 5 deletions
main.go
with
29 additions
and
5 deletions
client.go
+
20
−
0
View file @
160601e4
...
...
@@ -2,7 +2,9 @@ package main
import
(
"gitlab.com/elixxir/client/api"
"gitlab.com/elixxir/client/interfaces/contact"
"gitlab.com/elixxir/client/interfaces/params"
"gitlab.com/xx_network/primitives/utils"
"io/ioutil"
"gitlab.com/elixxir/client/single"
"os"
...
...
@@ -101,3 +103,21 @@ func waitUntilConnected(connected chan bool) {
}
}()
}
func
readBotContact
()
contact
.
Contact
{
// Read from file
data
,
err
:=
utils
.
ReadFile
(
botContactPath
)
jww
.
INFO
.
Printf
(
"Contact file size read in: %d bytes"
,
len
(
data
))
if
err
!=
nil
{
jww
.
FATAL
.
Panicf
(
"Failed to read contact file: %+v"
,
err
)
}
// Unmarshal contact
c
,
err
:=
contact
.
Unmarshal
(
data
)
if
err
!=
nil
{
jww
.
FATAL
.
Panicf
(
"Failed to unmarshal contact: %+v"
,
err
)
}
return
c
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
main.go
+
9
−
5
View file @
160601e4
...
...
@@ -8,17 +8,21 @@ import (
"time"
)
var
password
string
var
session
string
var
ndfPath
string
var
singleMngr
*
single
.
Manager
var
password
=
"password"
var
session
=
".session"
var
ndfPath
=
"ndf.json"
var
botContactPath
=
"botContact.bin"
var
botContact
contact
.
Contact
var
singleMngr
*
single
.
Manager
var
body
*
gowd
.
Element
func
main
()
{
//_, singleMngr = initClient()
botContact
=
readBotContact
()
_
,
singleMngr
=
initClient
()
// creates a new bootstrap fluid container
body
=
bootstrap
.
NewContainer
(
false
)
...
...
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