Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
perso-distributed-systems
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
xavier.perret
perso-distributed-systems
Commits
421bfc14
Commit
421bfc14
authored
2 years ago
by
Xavier Perret
Browse files
Options
Downloads
Patches
Plain Diff
simplification of id
parent
36be3773
Branches
Branches containing commit
No related tags found
1 merge request
!2
added file to separate client function from the server
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/command-line/userinput.go
+1
-5
1 addition, 5 deletions
app/command-line/userinput.go
with
1 addition
and
5 deletions
app/command-line/userinput.go
+
1
−
5
View file @
421bfc14
...
@@ -2,23 +2,19 @@ package command_line
...
@@ -2,23 +2,19 @@ package command_line
import
(
import
(
"fmt"
"fmt"
"math/rand"
ObjectStorageAPI
"node/object-storage"
ObjectStorageAPI
"node/object-storage"
Sender
"node/sender"
Sender
"node/sender"
.
"node/types"
.
"node/types"
"node/utilities"
"node/utilities"
"os"
"os"
"strconv"
"strconv"
"time"
)
)
// userCreatedTransaction is a function to interactively create a transaction using the terminal
// userCreatedTransaction is a function to interactively create a transaction using the terminal
func
userCreatedTransaction
(
config
Config
)
Transaction
{
func
userCreatedTransaction
(
config
Config
)
Transaction
{
fmt
.
Println
(
"--------------------STARTING USER CREATED TRANSACTION--------------------"
)
fmt
.
Println
(
"--------------------STARTING USER CREATED TRANSACTION--------------------"
)
var
trans
Transaction
var
trans
Transaction
now
:=
time
.
Now
()
.
String
()
trans
.
Id
=
utilities
.
RandomString
()
randomString
:=
strconv
.
Itoa
(
rand
.
Int
())
trans
.
Id
=
now
+
randomString
fmt
.
Println
()
fmt
.
Println
()
var
receiver
string
var
receiver
string
...
...
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