From d2d42496f98ab42bc80991af2d8f9b97b94e4f00 Mon Sep 17 00:00:00 2001 From: Henri Remonen Date: Sat, 9 Sep 2023 11:59:23 +0300 Subject: [PATCH] docs: fix lint errors by providing package documentation --- pkg/author/author.go | 12 ++++++++++++ pkg/commit/{commit_info.go => info.go} | 10 +++++----- pkg/validators/string_validators.go | 11 +++++++++++ 3 files changed, 28 insertions(+), 5 deletions(-) rename pkg/commit/{commit_info.go => info.go} (56%) diff --git a/pkg/author/author.go b/pkg/author/author.go index 820d634..aedabcd 100644 --- a/pkg/author/author.go +++ b/pkg/author/author.go @@ -1,3 +1,15 @@ +/* +Package author provides functions for working with Git commit authors and co-authors. + +This package includes functions for retrieving suggested co-authors who have made commits in the Git repository. +It uses the `git log` command to extract author names and email addresses from the commit history. The resulting list +of authors can be used when creating Git commits with co-authors. + +Usage: + - Call the GetSuggestedCoAuthors function to obtain a list of suggested co-authors based on the Git commit history. + +Copyright © 2023 HENRI REMONEN +*/ package author import ( diff --git a/pkg/commit/commit_info.go b/pkg/commit/info.go similarity index 56% rename from pkg/commit/commit_info.go rename to pkg/commit/info.go index 248cda1..3d7c999 100644 --- a/pkg/commit/commit_info.go +++ b/pkg/commit/info.go @@ -1,21 +1,21 @@ /* Package commit provides functionality for creating Git commits. -The CommitInfo struct in this package represents information needed for creating a Git commit. It includes fields for specifying the commit type, scope, description, body, co-authors, and breaking change details. +The Info struct in this package represents information needed for creating a Git commit. It includes fields for specifying the commit type, scope, description, body, co-authors, and breaking change details. Usage: - - Create instances of the CommitInfo struct to define commit information. + - Create instances of the Info struct to define commit information. - Set the CommitType, CommitDescription, and other fields to configure the commit. - Optionally, add co-authors to the CoAuthors field if the commit is co-authored. - Use the IsBreakingChange field to indicate whether the commit introduces a breaking change. - - For more information on how to use the CommitInfo struct and create Git commits, refer to the package-specific functions and commands. + - For more information on how to use the Info struct and create Git commits, refer to the package-specific functions and commands. Copyright © 2023 HENRI REMONEN */ package commit -// CommitInfo represents information needed for creating a Git commit. -type CommitInfo struct { +// Info represents information needed for creating a Git commit. +type Info struct { CommitType string CommitScope string CommitDescription string diff --git a/pkg/validators/string_validators.go b/pkg/validators/string_validators.go index d3a99e9..c45facf 100644 --- a/pkg/validators/string_validators.go +++ b/pkg/validators/string_validators.go @@ -1,3 +1,14 @@ +/* +Package validators provides a collection of utility functions for validating various data types. + +This package includes functions for validating different types of data, such as strings, numbers, and more. It serves as a library of validation functions that can be used across various applications. + +Usage: + - Explore the available validation functions to find the one that suits your validation needs. + - Call the relevant validation function to ensure the integrity of your data. + +Copyright © 2023 HENRI REMONEN +*/ package validators import "fmt"