Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpcs
dfss
Commits
e6b8e52d
Commit
e6b8e52d
authored
Feb 29, 2016
by
Loïck Bonniot
Browse files
[c] Fix cross-compilation for register command
parent
66c4467d
Pipeline
#347
passed with stage
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
e6b8e52d
...
...
@@ -7,6 +7,8 @@ stages:
Unit tests
:
stage
:
test
except
:
-
/^[0-9]+\./
tags
:
-
golang
-
mongo
# Require an available mongo service
...
...
@@ -40,6 +42,8 @@ Unit tests:
Integration tests
:
stage
:
test
except
:
-
/^[0-9]+\./
tags
:
-
golang
-
mongo
...
...
@@ -53,6 +57,8 @@ Integration tests:
Code lint
:
stage
:
test
except
:
-
/^[0-9]+\./
allow_failure
:
True
tags
:
-
golang
...
...
dfssc/register.go
View file @
e6b8e52d
...
...
@@ -8,7 +8,6 @@ import (
osuser
"os/user"
"strconv"
"strings"
"time"
"dfss/dfssc/user"
"golang.org/x/crypto/ssh/terminal"
...
...
@@ -20,17 +19,17 @@ func registerUser() {
var
country
,
mail
,
organization
,
unit
,
passphrase
string
var
bits
int
name
:=
"Jon Doe"
u
,
err
:=
osuser
.
Current
()
if
err
!=
nil
{
fmt
.
Println
(
"An error occurred : "
,
err
.
Error
())
return
if
err
==
nil
{
name
=
u
.
Name
}
// Get all the necessary parameters
readStringParam
(
"Mail"
,
""
,
&
mail
)
readStringParam
(
"Country"
,
time
.
Now
()
.
Location
()
.
String
()
,
&
country
)
readStringParam
(
"Organization"
,
u
.
N
ame
,
&
organization
)
readStringParam
(
"Organizational unit"
,
u
.
N
ame
,
&
unit
)
readStringParam
(
"Country"
,
"FR"
,
&
country
)
readStringParam
(
"Organization"
,
n
ame
,
&
organization
)
readStringParam
(
"Organizational unit"
,
n
ame
,
&
unit
)
readIntParam
(
"Length of the key (2048 or 4096)"
,
"2048"
,
&
bits
)
err
=
readPassword
(
&
passphrase
,
true
)
if
err
!=
nil
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment