Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix function comments based on best practices from Effective Go #114

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion database/migration/ghost.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type dateHolder struct {
lastLogin *time.Time
}

// Function to convert a Ghost database to use with Journey
// Ghost: Function to convert a Ghost database to use with Journey
func Ghost() {
// Check every file in data directory
err := filepath.Walk(filenames.DatabaseFilepath, inspectDatabaseFile)
Expand Down
2 changes: 1 addition & 1 deletion date/date.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

var marchMayChecker = regexp.MustCompile("M([^a]|$)")

// Whenever we need time.Now(), we use this function instead so that we always use UTC in journey
// GetCurrentTime: Whenever we need time.Now(), we use this function instead so that we always use UTC in journey
func GetCurrentTime() time.Time {
return time.Now().UTC()
}
Expand Down
2 changes: 1 addition & 1 deletion structure/methods/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"
)

// Function to put all arguments into a neatly organized map (splitting argument.Name with format "name=argument" into map["name"]"argument")
// ProcessHelperArguments: Function to put all arguments into a neatly organized map (splitting argument.Name with format "name=argument" into map["name"]"argument")
// for easier lookup and use in helper functions.
func ProcessHelperArguments(arguments []structure.Helper) map[string]string {
argumentsMap := make(map[string]string)
Expand Down