Skip to content
This repository has been archived by the owner on Jan 20, 2025. It is now read-only.

Commit

Permalink
Docs [Golang] [Package] (#34)
Browse files Browse the repository at this point in the history
* Docs [Golang] [Package] [BannerCLI]

- [+] docs(banner.go): update example usage in package documentation
- [+] chore(banner.go): update package author information

* Docs [Golang] [Package] [BannerCLI]

- [+] chore(banner.go): remove duplicate copyright comments
- [+] docs(banner.go): add note about typing simulation in PrintTypingBanner function

* Docs [Golang] [Package] [interactivity]

- [+] chore(interactivity.go): add copyright notice
- [+] docs(interactivity.go): update package description

* Docs [Golang] [Package] [Exporter]

- [+] chore(session.go): add copyright notice to the file
- [+] docs(session.go): update package description

* Docs [Golang] [Package] [FileSystem]

- [+] chore(filesystem): add copyright notice to file_system.go and file_system_mock.go

* Docs [Golang] [Package] [RepairData]

- [+] chore(repairdata.go): add copyright notice to repairdata.go file
- [+] docs(repairdata.go): add package description for repairdata package
  • Loading branch information
H0llyW00dzZ authored Dec 11, 2023
1 parent ad5fa65 commit fe810c8
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 9 deletions.
23 changes: 14 additions & 9 deletions bannercli/banner.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
// Copyright (c) 2023 H0llyW00dzZ
//
// Package bannercli provides functionality to print different styles of banners
// to the terminal. These styles include binary representation and simple
// animation effects to enhance the visual presentation of CLI applications.
// # bannercli/banner.go
// Example usage:
//
// bannercli.PrintTypingBanner("ChatGPT Session Exporter", 100*time.Millisecond)
// # Example Usage
//
// Copyright (c) 2023 H0llyW00dzZ
// func main() {
// // ... existing code ...
//
// // Display a binary banner
// banner.PrintTypingBanner("ChatGPT Session Exporter", 100*time.Millisecond)
// // Optionally, display an typing animated banner
// banner.PrintAnimatedBanner("ChatGPT Session Exporter", 3, 200*time.Millisecond)
//
// // ... rest of your main function ...
// }
package bannercli

import (
Expand All @@ -18,8 +27,6 @@ import (
// PrintBinaryBanner prints a binary representation of a banner.
// Each character of the message is converted into its binary form.
// Spaces between words are widened to enhance readability.
//
// Copyright (c) 2023 H0llyW00dzZ
func PrintBinaryBanner(message string) {
banner := strings.ReplaceAll(message, " ", " ")
for _, char := range banner {
Expand All @@ -32,8 +39,6 @@ func PrintBinaryBanner(message string) {
// horizontally across the terminal. The animation repeats the number of times
// specified by the `repeat` parameter with a delay between each frame as
// specified by the `delay` parameter.
//
// Copyright (c) 2023 H0llyW00dzZ
func PrintAnimatedBanner(message string, repeat int, delay time.Duration) {
for r := 0; r < repeat; r++ {
for i := 0; i < len(message); i++ {
Expand All @@ -48,7 +53,7 @@ func PrintAnimatedBanner(message string, repeat int, delay time.Duration) {
//
// Each character appears sequentially with a delay, simulating a typing effect.
//
// Copyright (c) 2023 H0llyW00dzZ
// Note: This simulation typing just like a human would type.
func PrintTypingBanner(message string, delay time.Duration) {
for _, char := range message {
fmt.Printf("%c", char)
Expand Down
2 changes: 2 additions & 0 deletions exporter/session.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) 2023 H0llyW00dzZ
//
// Package exporter provides tools for extracting and converting chat session data
// from JSON files into various formats, such as CSV and JSON datasets.
//
Expand Down
2 changes: 2 additions & 0 deletions filesystem/file_system.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) 2023 H0llyW00dzZ
//
// Package filesystem provides an abstraction over the native file system operations.
//
// This allows for easy testing and mocking of file system interactions.
Expand Down
2 changes: 2 additions & 0 deletions filesystem/file_system_mock.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) 2023 H0llyW00dzZ
//
// Below, the package filesystem (@file_system_mock.go) furnishes a mock implementation of the FileSystem
// interface intended for testing. It enables the monitoring of file operations and
// the emulation of file system interactions without real disk I/O, showcasing the
Expand Down
2 changes: 2 additions & 0 deletions interactivity/interactivity.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) 2023 H0llyW00dzZ
//
// Package interactivity provides functions to handle interactive command-line interfaces.
//
// It includes utilities for prompting users for confirmation and reading their input in a context-aware manner, which allows for graceful
Expand Down
2 changes: 2 additions & 0 deletions repairdata/repairdata.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) 2023 H0llyW00dzZ
//
// Package repairdata provides utilities for transforming JSON data from an old format to a new format.
//
// It specifically ensures that each session's modelConfig contains a 'systemprompt' field.
Expand Down

0 comments on commit fe810c8

Please sign in to comment.