Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
goatherd
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
arw
goatherd
Commits
6b5db999
Commit
6b5db999
authored
8 years ago
by
Lukas Braun
Browse files
Options
Downloads
Patches
Plain Diff
remove unused named return parameters in check_offer
parent
d371828c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
goatherd.go
+3
-3
3 additions, 3 deletions
goatherd.go
with
3 additions
and
3 deletions
goatherd.go
+
3
−
3
View file @
6b5db999
...
...
@@ -173,12 +173,14 @@ func transaction_failed(err error) bool {
// Retrieve secret and count for given username and try to find a match within
// the lookahead range. Update count in DB if match is found. All within a
// transaction, retrying if it fails.
func
check_offer
(
db
*
sql
.
DB
,
remote
net
.
Addr
,
name
string
,
offer
string
)
(
ok
bool
,
err
error
)
{
func
check_offer
(
db
*
sql
.
DB
,
remote
string
,
name
string
,
offer
string
)
(
bool
,
error
)
{
for
{
debugf
(
"[%v] begin transaction"
,
remote
)
tx
,
err
:=
db
.
Begin
()
err_panic
(
err
)
ok
:=
false
debugf
(
"[%v] looking up data for %v"
,
remote
,
name
)
hotp
,
err
:=
get_otp
(
tx
,
name
)
if
transaction_failed
(
err
)
{
...
...
@@ -207,8 +209,6 @@ func check_offer(db *sql.DB, remote net.Addr, name string, offer string) (ok boo
}
}
ok
=
false
commit
:
debugf
(
"[%v] commiting"
,
remote
)
err
=
tx
.
Commit
()
...
...
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