Properly format function documentation comments

This commit is contained in:
2024-08-11 16:37:28 -04:00
parent 9f43337437
commit 06b9527a33
25 changed files with 105 additions and 112 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
package core
// GetOldEntryData decrypts and returns old entry data (with all required lines present)
// GetOldEntryData decrypts and returns old entry data (with all required lines present).
func GetOldEntryData(targetLocation string, field int) []string {
// ensure targetLocation exists
TargetIsFile(targetLocation, true, 2)
@@ -10,14 +10,14 @@ func GetOldEntryData(targetLocation string, field int) []string {
// return the old entry data with all required lines present
if field > 0 {
return EnsureSliceLength(unencryptedEntry, field)
return ensureSliceLength(unencryptedEntry, field)
} else {
return unencryptedEntry
}
}
// EnsureSliceLength ensures slice is long enough to contain the specified index
func EnsureSliceLength(slice []string, index int) []string {
// ensureSliceLength is a utility function that ensures a slice is long enough to contain the specified index.
func ensureSliceLength(slice []string, index int) []string {
for len(slice) <= index {
slice = append(slice, "")
}