Make function returns nicer #13

Closed
opened 2025-01-27 00:47:11 +01:00 by sacha · 1 comment
Owner

What I have done so far:

func (solver *Solver) somefunc() int {
    var somevar int = 20
    return somevar
}

What I could should be doing is:

func (solver *Solver) somefunc() (somevar int) {
    somevar = 20
    return
}

I am a 100% sure the latter is the case for only one function, and the former is available for all other functions.

What I have done so far: ```go func (solver *Solver) somefunc() int { var somevar int = 20 return somevar } ``` What I could should be doing is: ```go func (solver *Solver) somefunc() (somevar int) { somevar = 20 return } ``` I am a 100% sure the latter is the case for only one function, and the former is available for all other functions.
sacha referenced this issue from a commit 2025-01-27 18:41:36 +01:00
Author
Owner

This functions have been cleaned up.

This functions have been cleaned up.
sacha closed this issue 2025-01-27 20:24:18 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: golang/sudoku-funpark#13
No description provided.