Skip to content

Commit

Permalink
Slight changes to make all functions documentable via godoc
Browse files Browse the repository at this point in the history
  • Loading branch information
GwynethLlewelyn committed Jan 19, 2020
1 parent 5cfda12 commit b7aab65
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions backoffice.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ func setSession(userName string, response http.ResponseWriter) {
} else {
Log.Error("Error encoding cookie:", err)
}
}
}

// getUserName sees if we have a session cookie with an encoded user name, returning nil if not found.
// getUserName sees if we have a session cookie with an encoded user name, returning nil if not found.
func getUserName(request *http.Request) (userName string) {
if cookie, err := request.Cookie("session"); err == nil {
cookieValue := make(map[string]string)
Expand Down
2 changes: 1 addition & 1 deletion gobot.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func loadConfiguration() {
fmt.Println("Logging set up.")
}

// main() starts here.
// main starts here.
func main() {
// to change the flags on the default logger
// see https://stackoverflow.com/a/24809859/1035977
Expand Down
2 changes: 1 addition & 1 deletion ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func uiAgentsRemove(w http.ResponseWriter, r *http.Request) {
Log.Debug("Agents UUIDs >>", string(body), "<< successfully removed.")
}

// positionType is a struct to hold data retrieved from the database, used by several functions (including JSON).
// PositionType is a struct to hold data retrieved from the database, used by several functions (including JSON).
type PositionType struct {
PermURL zero.String
UUID zero.String
Expand Down

0 comments on commit b7aab65

Please sign in to comment.