From 0ffa7da248705e7c40b9fcc14aaafb6d314f659e Mon Sep 17 00:00:00 2001 From: CodeLingo Bot Date: Wed, 13 Feb 2019 00:52:48 +0000 Subject: [PATCH] Fix function comments based on best practices from Effective Go Signed-off-by: CodeLingo Bot --- database/migration/ghost.go | 2 +- date/date.go | 2 +- structure/methods/helper.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/database/migration/ghost.go b/database/migration/ghost.go index 913cf12b..9cc8fec5 100644 --- a/database/migration/ghost.go +++ b/database/migration/ghost.go @@ -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) diff --git a/date/date.go b/date/date.go index 2fe16227..deb6831d 100644 --- a/date/date.go +++ b/date/date.go @@ -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() } diff --git a/structure/methods/helper.go b/structure/methods/helper.go index 098d4da5..f4d79a5e 100644 --- a/structure/methods/helper.go +++ b/structure/methods/helper.go @@ -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)