diff --git a/navigator/docs.go b/navigator/docs.go index f019546..5da277e 100644 --- a/navigator/docs.go +++ b/navigator/docs.go @@ -1,26 +1,23 @@ -// Package navigator provides structured logging capabilities for the K8sBlackPearl project, -// leveraging the uber-go/zap library. It offers leveled logging with the option to prefix -// messages with emojis for enhanced visual distinction. +// Package navigator provides structured logging capabilities tailored for the K8sBlackPearl project, +// utilizing the uber-go/zap library for high-performance, leveled logging. This package enhances +// log messages with emojis for visual distinction and supports structured logging with zap.Field parameters. // -// A package-level Logger variable is available and protected by a mutex to ensure safe -// concurrent access. This Logger should be initialized and set using SetLogger prior to -// invoking any logging functions. Failing to set the Logger will result in error messages -// being printed to standard output instead of proper log entries. +// A package-level Logger variable is available, which should be set using SetLogger before any logging +// functions are called. If the Logger is not set, logging functions will default to printing error messages +// to standard output to prevent the application from panicking due to a nil Logger. // -// Logging functions such as LogInfoWithEmoji and LogErrorWithEmoji are available for -// recording informational and error messages, respectively. These functions enhance log -// messages with emojis and a context string for quick identification. They also support -// structured logging by accepting a variable number of zap.Field parameters. +// Functions such as LogInfoWithEmoji and LogErrorWithEmoji are provided for logging informational and error +// messages, respectively. These functions append emojis to the log messages for easier visual scanning in log +// output. They also accept a variable number of zap.Field parameters for structured context logging. // -// Helper function CreateLogFields is provided to generate a slice of zap.Field from -// specified strings, facilitating the inclusion of consistent structured context within -// logs throughout the application. +// The CreateLogFields helper function is available to generate a slice of zap.Field from specified strings, +// enabling consistent structured context in logs throughout the application. // // # Usage // -// The Logger must be initialized and set using SetLogger before any logging activity. -// Subsequently, LogInfoWithEmoji and LogErrorWithEmoji can be employed for logging -// messages with structured context. +// Before logging, the Logger must be initialized and set using SetLogger. After setting up, the logging +// functions such as LogInfoWithEmoji and LogErrorWithEmoji can be used for logging messages with structured +// context. // // Example: // @@ -28,7 +25,7 @@ // logger, _ := zap.NewProduction() // navigator.SetLogger(logger) // -// // Logging with the package functions +// // Logging with package functions // navigator.LogInfoWithEmoji("🚀", "Application started") // navigator.LogErrorWithEmoji("❗️", "An error occurred", zap.Error(err)) // diff --git a/worker/configuration/docs.go b/worker/configuration/docs.go index 422adb6..9cf17cb 100644 --- a/worker/configuration/docs.go +++ b/worker/configuration/docs.go @@ -7,36 +7,23 @@ // It includes methods such as LoadTasksFromJSON and LoadTasksFromYAML to facilitate the // reading and parsing of configuration files. // -// A package-level ValidateTask function is exposed to ensure that task configurations -// adhere to expected schemas and constraints. This function should be used to validate -// tasks after loading them to prevent runtime errors due to misconfiguration. -// -// The package also includes helper functions like ConvertToTaskSlice which assists in -// converting generic interface{} types (which may be the result of unstructured parsing) -// into a slice of Task structs. +// The LoadTasks function is exposed to load tasks from a file whose extension determines +// the format of the tasks to be loaded (either JSON or YAML). This function abstracts away +// the specific parsing logic and provides a simple interface for loading tasks. // // # Usage // -// The LoadTasksFromJSON and LoadTasksFromYAML functions should be used to load task -// configurations at the start of the application. The ValidateTask function can be -// used to ensure the validity of the loaded tasks. +// The LoadTasks function should be used to load task configurations at the start of the application. // // Example: // -// // Loading tasks from a JSON configuration file -// tasks, err := configuration.LoadTasksFromJSON("tasks.json") +// // Loading tasks from a configuration file (JSON or YAML) +// tasks, err := configuration.LoadTasks("tasks.json") // .json or .yaml file // if err != nil { // // Handle error // } // -// // Validate loaded tasks -// for _, task := range tasks { -// if err := configuration.ValidateTask(task); err != nil { -// // Handle validation error -// } -// } -// -// // Application logic using the validated tasks +// // Application logic using the loaded tasks // for _, task := range tasks { // fmt.Printf("Task: %+v\n", task) // }