From ddf694efeaf8eefa741e8f61a194db1d4bcd4f01 Mon Sep 17 00:00:00 2001 From: ccoVeille <3875889+ccoVeille@users.noreply.github.com> Date: Tue, 5 Nov 2024 22:14:10 +0100 Subject: [PATCH] doc(typo): fix typos and style --- CHANGELOG.md | 2 +- README.md | 16 ++++++++-------- SPRIG_TO_SPROUT_CHANGES_NOTES.md | 4 ++-- docs/README.md | 4 ++-- docs/SUMMARY.md | 4 ++-- docs/advanced/how-to-create-a-handler.md | 2 +- docs/features/function-aliases.md | 6 +++--- docs/features/function-notices.md | 4 ++-- docs/features/loader-system-registry-group.md | 2 +- docs/groups/list-of-all-registry-groups.md | 2 +- docs/introduction/getting-started.md | 4 ++-- docs/introduction/templating-conventions.md | 8 ++++---- docs/migration-from-sprig.md | 6 +++--- docs/registries/checksum.md | 2 +- docs/registries/conversion.md | 10 +++++----- docs/registries/crypto.md | 4 ++-- docs/registries/list-of-all-registries.md | 2 +- docs/registries/network.md | 2 +- docs/registries/reflect.md | 4 ++-- docs/registries/slices.md | 4 ++-- docs/registries/time.md | 2 +- docs/roadmap-to-sprout-v1.0.md | 16 ++++++++-------- 22 files changed, 55 insertions(+), 55 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af42728..407206e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,7 +33,7 @@ _This section's comparisons are based on Sprig v3.2.3. If you're totally new, we - **`toDuration` Conversion Function**: A new utility to simplify time conversions across templates. See [PR 27](https://github.com/go-sprout/sprout/pull/27). ### 📚 **Documentation** -- **Fancy and complete documentation**: Create a fancy and complete documentatio, ensuring they’re up to date and aligned with Sprout’s growth. [Documentation](https://sprout.atom.codes) +- **Fancy and complete documentation**: Create a fancy and complete documentation, ensuring they are up-to-date and aligned with Sprout’s growth. [Documentation](https://sprout.atom.codes) --- diff --git a/README.md b/README.md index fd5bb03..c60e520 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ You can track our progress towards Sprout v1.0 by following the documentation pa - [Building Function Maps](#building-function-maps) - [Working with Templates](#working-with-templates) - [Usage: Quick Example (code only)](#usage-quick-example) -- [Performence Benchmarks](#performence-benchmarks) +- [Performance Benchmarks](#performance-benchmarks) - [Sprig v3.2.3 vs Sprout v0.2](#sprig-v323-vs-sprout-v02) - [Development Philosophy (Currently in reflexion to create our)](#development-philosophy-currently-in-reflexion-to-create-our) @@ -57,8 +57,8 @@ Sprout provide a package `sprigin` to provide a drop-in replacement for Sprig in > [!IMPORTANT] > The `sprigin` package is a temporary solution to provide backward compatibility with Sprig. We recommend updating your code to use the Sprout package directly to take advantage of the new features and improvements. -> -> A complete guide are available in the [documentation](https://docs.atom.codes/sprout/migration-from-sprig). +> +> A complete guide is available in the [documentation](https://docs.atom.codes/sprout/migration-from-sprig). ```diff import ( @@ -103,7 +103,7 @@ handler := sprout.New( ### Working with Registries Registries in Sprout are groups of functions that can be added to a handler. They help organize functions and optimize template performance. -You can retrieve all built-ins registries and functions under [Registries](https://docs.atom.codes/sprout/registries/list-of-all-registries). +You can retrieve all built-in registries and functions under [Registries](https://docs.atom.codes/sprout/registries/list-of-all-registries). ```go import ( @@ -122,7 +122,7 @@ handler.AddRegistries( ### Working with Registries Groups In some cases, you can use a group of registries to add multiple registries at once. -You can retrieve all built-ins registries groups under [Registry Groups](https://docs.atom.codes/sprout/groups/list-of-all-registry-groups). +You can retrieve all built-in registries groups under [Registry Groups](https://docs.atom.codes/sprout/groups/list-of-all-registry-groups). ```go import ( @@ -181,7 +181,7 @@ func main() { } ``` -## Performence Benchmarks +## Performance Benchmarks To see all the benchmarks, please refer to the [benchmarks](benchmarks/README.md) directory. @@ -204,7 +204,7 @@ So, Sprout v0.5 is approximately 45.3% faster and uses 16.5% less memory than Sp You can see the full benchmark results [here](benchmarks/README.md). -## Development Philosophy (Currently in reflexion to create our) +## Development Philosophy (Currently in consideration to create ours) Our approach to extending and refining Sprout was guided by several key principles: @@ -212,7 +212,7 @@ Our approach to extending and refining Sprout was guided by several key principl - Empower developers to create robust templates without sacrificing performance or usability. - Adheres strictly to Go's templating conventions, ensuring a seamless experience for those familiar with Go's native tools. - Naming conventions across functions are standardized for predictability and ease of use. -- Emphasizes error handling, preferring safe defaults over panics. +- Emphasizes error handling, preferring to safe defaults over panics. - Provide a clear and comprehensive documentation to help users understand the library and its features. - Maintain a high level of code quality, ensuring that the library is well-tested, performant, and reliable. - Continuously improve and optimize the library to meet the needs of the community. diff --git a/SPRIG_TO_SPROUT_CHANGES_NOTES.md b/SPRIG_TO_SPROUT_CHANGES_NOTES.md index 63f7216..7b559b7 100644 --- a/SPRIG_TO_SPROUT_CHANGES_NOTES.md +++ b/SPRIG_TO_SPROUT_CHANGES_NOTES.md @@ -16,7 +16,7 @@ migrated yet to the [Migration from Sprig](https://docs.atom.codes/sprout/migrat ## Templating Differences ### Bugs fixed -In Sprig, somes functions have bugs that have been fixed in Sprout: +In Sprig, some functions have bugs that have been fixed in Sprout: 1. `{{ "foooboooooo" | abbrevboth 4 9 }}` - Sprig: `fooobo...` @@ -40,5 +40,5 @@ In Sprig, somes functions have bugs that have been fixed in Sprout: - Sprig: `foobar` | `foobar` - Sprout: `foo` | `bar` 8. `{{ .duration | durationRound }}` - - Sprig: `0s` (only when not casted to `time.Duration` before, `{{ .duration | duration | durationRound }}` works as expected with `5s`) + - Sprig: `0s` (only when not cast to `time.Duration` before, `{{ .duration | duration | durationRound }}` works as expected with `5s`) - Sprout: `5s` diff --git a/docs/README.md b/docs/README.md index a0c597d..7122902 100644 --- a/docs/README.md +++ b/docs/README.md @@ -18,7 +18,7 @@ Our aim is to foster a dynamic and collaborative development environment, welcom {% hint style="info" %} For a detailed explanation of the changes between Sprig and Sprout, see [SPRIG\_TO\_SPROUT\_CHANGES\_NOTES.md](../SPRIG\_TO\_SPROUT\_CHANGES\_NOTES.md). This document will help contributors and maintainers understand the modifications made between the fork date and version 1.0.0 of the Sprout library. This file will be moved here soon with better formatting. -**Also a complete guide to migrate from sprig combability mode to a full sprout experience!** +**Also, a complete guide to migrate from sprig compatibility mode to a full sprout experience!** {% endhint %} ### Big thanks @@ -27,6 +27,6 @@ We owe a tremendous **amount of gratitude to the original authors and contributo To every individual who has contributed to Sprig, whether through code, documentation, or community support, we extend our heartfelt thanks. Your contributions have been invaluable, and Sprout’s evolution is a testament to the solid foundation you've built. We're honored to build on this legacy and are excited about the future **we can create together**. -A **big shoutout to the original author(s) and every single contributor** for paving the way. We are committed to maintaining the spirit of open collaboration and innovation that you've instilled in this project. Here’s to continued success and to sharing the love and respect for the open-source community that drives us forward. +A **big shout-out to the original author(s) and every single contributor** for paving the way. We are committed to maintaining the spirit of open collaboration and innovation that you've instilled in this project. Here’s to continued success and to sharing the love and respect for the open-source community that drives us forward. Thank you for inspiring us and countless others in this journey. diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 23e4195..c01372a 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -34,7 +34,7 @@ * [Random](registries/random.md) * [Reflect](registries/reflect.md) * [Regexp](registries/regexp.md) -* [Semver](registries/semver.md) +* [SemVer](registries/semver.md) * [Slices](registries/slices.md) * [Std](registries/std.md) * [Strings](registries/strings.md) @@ -55,4 +55,4 @@ ## Links -* [Github repository](https://github.com/go-sprout/sprout) +* [GitHub repository](https://github.com/go-sprout/sprout) diff --git a/docs/advanced/how-to-create-a-handler.md b/docs/advanced/how-to-create-a-handler.md index 8a52e34..45ba466 100644 --- a/docs/advanced/how-to-create-a-handler.md +++ b/docs/advanced/how-to-create-a-handler.md @@ -30,7 +30,7 @@ type MyCustomHandler struct { ### Step 3: Implement the Handler Interface -Next, implement the `Handler` interface methods in your custom struct. I take logger as example +Next, implement the `Handler` interface methods in your custom struct. I take logger as example. ```go func (h *MyCustomHandler) Logger() *slog.Logger { diff --git a/docs/features/function-aliases.md b/docs/features/function-aliases.md index 1ec3c90..a085c70 100644 --- a/docs/features/function-aliases.md +++ b/docs/features/function-aliases.md @@ -14,7 +14,7 @@ To configure aliases, you must use the Sprout function handler. ## How It Works -* **Definition:** An alias acts as a secondary name for a function, referring to the original implementation in memory, the function are not duplicated at runtime. +* **Definition:** An alias behaves as a secondary name for a function, referring to the original implementation in memory, the function is not duplicated at runtime. * **Usage:** When the deprecated (aliased) function names are used, the code behaves as if the new function names were called, ensuring compatibility. * **Example:** Suppose `oldFunc` is deprecated in favor of `newFunc` in your template. The alias allows code calling `oldFunc` to execute `newFunc` transparently. @@ -31,7 +31,7 @@ template.New("base").Funcs(handler.Build()).Parse("{{ newFunc }}") This creates a mapping between an old function name (`oldFunc`) and a new one (`newFunc`). Calls to `oldFunc` within the template are redirected to execute `newFunc`. This enables the template to parse and execute using the new function name seamlessly. -### Add more than one aliases for te same function +### Add more than one aliases for the same function To add more aliases for the same original function, simply add more parameters to the `WithAlias` function: @@ -53,7 +53,7 @@ var myAliases = sprout.FunctionAliasMap{ handler := sprout.New(sprout.WithAliases(myAliases)) ``` -This creates two aliases for two methodes (4 in total). Calling `oldFunc` or `secondAlias` with execute `newFunc` and calling `hi` or `greet` will execute `hello`. +This creates two aliases for two methods (4 in total). Calling `oldFunc` or `secondAlias` with execute `newFunc` and calling `hi` or `greet` will execute `hello`. ## Best Practices diff --git a/docs/features/function-notices.md b/docs/features/function-notices.md index 48bdf9f..8ca6951 100644 --- a/docs/features/function-notices.md +++ b/docs/features/function-notices.md @@ -16,7 +16,7 @@ This feature is crucial for migrating from Sprig v3.2.3 or when upgrading betwee The Notice Feature works by wrapping existing function calls with additional logic that triggers notices when those functions are invoked. -The notice are sent to the `slog.Logger` configured on the handler, with 2 extra attributes for helping monitoring : +The notice are sent to the `slog.Logger` configured on the handler, with 2 extra attributes for help to monitor : * **function**: how contains the name of the function how trigger this notice. * **notice:** how indicate the kind of the notice `info`, `debug` or `deprecated`. @@ -28,7 +28,7 @@ The notice are sent to the `slog.Logger` configured on the handler, with 2 extra First, you need to define a notice for a function that you want to monitor. For example, to mark a function as deprecated: {% hint style="warning" %} -**Be careful**, the function name are case-sensitive +**Be careful**, the function names are case-sensitive {% endhint %} ```go diff --git a/docs/features/loader-system-registry-group.md b/docs/features/loader-system-registry-group.md index 24aa80f..dabcdee 100644 --- a/docs/features/loader-system-registry-group.md +++ b/docs/features/loader-system-registry-group.md @@ -16,7 +16,7 @@ Using a `RegistryGroup` can help you manage multiple registries. But can lead to ## How to use a registry group -If you have creted a `RegistryGroup` or want to use a built-in group, you can add it to your handler using the `AddGroups` method: +If you have created a `RegistryGroup` or want to use a built-in group, you can add it to your handler using the `AddGroups` method: ```go err := handler.AddGroups(group1, group2) diff --git a/docs/groups/list-of-all-registry-groups.md b/docs/groups/list-of-all-registry-groups.md index ee94fe4..1b97050 100644 --- a/docs/groups/list-of-all-registry-groups.md +++ b/docs/groups/list-of-all-registry-groups.md @@ -17,5 +17,5 @@ You can found more details about registry groups in the [loader-system-registry- {% hint style="info" %} You can open an issue to ask to be listed here. We are a community :seedling: -And maybe your registry will be embed on sprout directly, who know :eyes: +And maybe your registry will be embedded on sprout directly, who know :eyes: {% endhint %} diff --git a/docs/introduction/getting-started.md b/docs/introduction/getting-started.md index 784b0a2..6efaa88 100644 --- a/docs/introduction/getting-started.md +++ b/docs/introduction/getting-started.md @@ -70,7 +70,7 @@ Sprout supports various customization options using handler options: See more below or in dedicated page [function-aliases.md](../features/function-aliases.md "mention"). * **Notices:**\ - You can specify a notice (info, deprecated, warn) on specific function, this message has writed on the logger at runtime when rendering the template: + You can specify a notice (info, deprecated, warn) on specific function, this message has written on the logger at runtime when rendering the template: ```go handler := sprout.New(sprout.WithNotices(sprout.NewInfoNotice("foo", "You use foo"))) @@ -174,4 +174,4 @@ This will render the template with all functions and aliases available. Sprout provides a structured and powerful way to manage template functions in Go, making it easier to build, maintain, and extend templating functionality. With features like custom registries, aliases, and configurable error handling, Sprout can significantly enhance your templating experience. -For more informations or questions, refer to the [Sprout GitHub repository](https://github.com/go-sprout/sprout). +For more information or questions, refer to the [Sprout GitHub repository](https://github.com/go-sprout/sprout). diff --git a/docs/introduction/templating-conventions.md b/docs/introduction/templating-conventions.md index c7f1102..5614c17 100644 --- a/docs/introduction/templating-conventions.md +++ b/docs/introduction/templating-conventions.md @@ -12,14 +12,14 @@ description: >- ### Go Code Formatting * We follow the standard Go formatting conventions using `gofmt`. Ensure that your code is formatted before submitting a pull request. -* Run `go fmt ./...` before commiting to format the code +* Run `go fmt ./...` before committing to format the code. ### Naming Conventions #### Registry * **Packages:** Package names should be short and concise. Use singular nouns (e.g., `util` instead of `utils`). Exception on `strings`, `slices`, `maps` to match the go std package naming. -* **UID:** The UID of a repository must be in camelCase and prefixed with your name/org separated ny a dot (e.g., `42atomys.myRegistry` instead of `my-registry`) +* **UID:** The UID of a repository must be in camelCase and prefixed with your name/org separated by a dot (e.g., `42atomys.myRegistry` instead of `my-registry`) * **Registry README/Comments:** Each package should have a comment or a README that provides a brief overview of its purpose. #### Functions @@ -51,8 +51,8 @@ description: >- Directory Layout ```bash -├── benchmarks/ # benchmarks used to ensure performence and backward -├── docs/ # docuementation of the project hosted on sprout.atom.codes +├── benchmarks/ # benchmarks used to ensure performance and backward +├── docs/ # documentation of the project hosted on sprout.atom.codes ├── internal/helpers/ # private cross registry library code ├── pesticide/ # package to help you to test your functions on a template engine ├── registry/ # contains all officials registry of sprout diff --git a/docs/migration-from-sprig.md b/docs/migration-from-sprig.md index 5bf8a27..8bee647 100644 --- a/docs/migration-from-sprig.md +++ b/docs/migration-from-sprig.md @@ -119,7 +119,7 @@ As a library developer, you can extend Sprout by creating your [own function reg {% endhint %} {% hint style="success" %} -Our maintainers and collaborators can assist you if you have question, don't hesitate to [open a discussion on Github](https://github.com/orgs/go-sprout/discussions/categories/q-a) ! +Our maintainers and collaborators can assist you if you have question, don't hesitate to [open a discussion on GitHub](https://github.com/orgs/go-sprout/discussions/categories/q-a) ! {% endhint %} ## Migrating Common Functions @@ -267,7 +267,7 @@ if err != nil { #### Merge / MergeOverwrite -* **Sprig**: The `merge` and `mergeOverwrite` functions does dereferencing when second value are the default golang value (example: `0` for int). +* **Sprig**: The `merge` and `mergeOverwrite` functions does dereference when second value are the default golang value (example: `0` for int). * **Sprout**: The `merge` and `mergeOverwrite` functions does not dereference and keep the second value as is (example: `0` for int). ## Deprecated Features @@ -282,7 +282,7 @@ Move critical operations outside of templates to maintain security. {% endhint %} {% hint style="warning" %} -Perform cryptographic operations (listed in `crypto` package) outside of templates. the [`crypto`regisry ](registries/crypto.md)will be drop in few versions. +Perform cryptographic operations (listed in `crypto` package) outside of templates. the [`crypto`registry ](registries/crypto.md)will be drop in few versions. {% endhint %} All deprecated features are flagged with `// ! DEPRECATED` in codebase.\ diff --git a/docs/registries/checksum.md b/docs/registries/checksum.md index 70b99a4..09e94a4 100644 --- a/docs/registries/checksum.md +++ b/docs/registries/checksum.md @@ -70,7 +70,7 @@ Adler32Sum calculates the Adler-32 checksum of the input string and returns it a {% tabs %} -{% tab title="Tempalte Example" %} +{% tab title="Template Example" %} ```go {{ adler32Sum "" }} // Output: 00000001 {{ adler32Sum "Hello, World!" }} // Output: 1f9e046a diff --git a/docs/registries/conversion.md b/docs/registries/conversion.md index 52128bd..e7cda34 100644 --- a/docs/registries/conversion.md +++ b/docs/registries/conversion.md @@ -17,7 +17,7 @@ import "github.com/go-sprout/sprout/registry/conversion" ### toBool -toBool converts a value from any types reasonably be converted to a boolean. _Using the_ [_cast_ ](https://github.com/spf13/cast)_package._ +toBool converts a value from any types reasonably be converted to a boolean value. _Using the_ [_cast_ ](https://github.com/spf13/cast)_package._
NameValue
Signature
ToBool(v any) (bool, error)
 
@@ -36,7 +36,7 @@ toBool converts a value from any types reasonably be converted to a boolean. _Us ### toInt -toInt converts a value into a int. _Using the_ [_cast_ ](https://github.com/spf13/cast)_package._ +toInt converts a value into an `int`. _Using the_ [_cast_ ](https://github.com/spf13/cast)_package._
NameValue
Signature
ToInt(v any) (int, error)
 
@@ -54,7 +54,7 @@ toInt converts a value into a int. _Using the_ [_cast_ ](https://github.com/spf1 ### toInt64 -toInt64 converts a value into a int64. _Using the_ [_cast_ ](https://github.com/spf13/cast)_package._ +toInt64 converts a value into an `int64`. _Using the_ [_cast_ ](https://github.com/spf13/cast)_package._
NameValue
Signature
ToInt64(v any) (int64, error)
 
@@ -72,7 +72,7 @@ toInt64 converts a value into a int64. _Using the_ [_cast_ ](https://github.com/ ### toUint -toUint converts a value into a uint. Utilizes the [cast](https://github.com/spf13/cast) package for conversion. +toUint converts a value into a `uint`. Utilizes the [cast](https://github.com/spf13/cast) package for conversion.
NameValue
Signature
ToUint(v any) (uint, error)
 
@@ -90,7 +90,7 @@ toUint converts a value into a uint. Utilizes the [cast](https://github.com/spf1 ### toUint64 -toUint64 converts a value into a uint64. Utilizes the [cast](https://github.com/spf13/cast) package for conversion. +toUint64 converts a value into a `uint64`. Utilizes the [cast](https://github.com/spf13/cast) package for conversion.
NameValue
Signature
ToUint64(v any) (uint64, error)
 
diff --git a/docs/registries/crypto.md b/docs/registries/crypto.md index 599d767..3f799e8 100644 --- a/docs/registries/crypto.md +++ b/docs/registries/crypto.md @@ -28,7 +28,7 @@ Directly using cryptographic functions in templates poses significant security r The function generates a bcrypt hash from the given input string, providing a secure way to store passwords or other sensitive data. {% hint style="warning" %} -Be careful, this method use the default cost of the library and can cause security vulnerabilities. +Be careful, this method uses the default cost of the library and can cause security vulnerabilities. {% endhint %}
NameValue
Signature
Bcrypt(input string) (string, error)
@@ -47,7 +47,7 @@ Be careful, this method use the default cost of the library and can cause securi
 The function generates an Htpasswd hash from the given username and password strings, typically used for basic authentication in web servers.
 
 {% hint style="warning" %}
-Be careful, this method use the default cost of the library and can cause security vulnerabilities.
+Be careful, this method uses the default cost of the library and can cause security vulnerabilities.
 {% endhint %}
 
 
NameValue
Signature
Htpasswd(username string, password string) (string, error)
diff --git a/docs/registries/list-of-all-registries.md b/docs/registries/list-of-all-registries.md
index da0cbf0..b7cf851 100644
--- a/docs/registries/list-of-all-registries.md
+++ b/docs/registries/list-of-all-registries.md
@@ -33,5 +33,5 @@ Every function is categorized into a registry and may include a [**'must'** vers
 {% hint style="info" %}
 You can open an issue to ask to be listed here. We are a community :seedling:
 
-And maybe your registry will be embed on sprout directly, who know :eyes:
+And maybe your registry will be embedded on sprout directly, who know :eyes:
 {% endhint %}
diff --git a/docs/registries/network.md b/docs/registries/network.md
index 42fbedb..af3b87f 100644
--- a/docs/registries/network.md
+++ b/docs/registries/network.md
@@ -227,7 +227,7 @@ CIDRSize calculates the total number of IP addresses in the given CIDR block. It
 CIDRRangeList generates a list of all IP addresses within the given CIDR block. It works for both IPv4 and IPv6 CIDR blocks, returning a list of all IP addresses as strings. This function is useful for iterating over all IP addresses in a CIDR block or generating a list of IP addresses for further processing.
 
 {% hint style="warning" %}
-Be careful, this method can generate a large number of IP addresses for large CIDR blocks, which may consume a significant amount of memory and processing time.
+Be careful, this method can generate numerous IP addresses for large CIDR blocks, which may consume a significant amount of memory and processing time.
 {% endhint %}
 
 
diff --git a/docs/registries/reflect.md b/docs/registries/reflect.md
index 1daccb7..fa9e859 100644
--- a/docs/registries/reflect.md
+++ b/docs/registries/reflect.md
@@ -17,7 +17,7 @@ import "github.com/go-sprout/sprout/registry/reflect"
 
 ### typeIs
 
-The function compares the type of a given value (`src`) to a specified target type string (`target`). It returns `true` if the type of `src` matches the target type.
+The function compares the type of the provided value (`src`) to a specified target type string (`target`). It returns `true` if the type of `src` matches the target type.
 
 
NameValue
Signature
TypeIs(target string, src any) bool
 
@@ -32,7 +32,7 @@ The function compares the type of a given value (`src`) to a specified target ty ### typeIsLike -The function compares the type of a given value (`src`) to a target type string (`target`), with an option for a wildcard `*` prefix (pointer). It returns `true` if `src` matches `target` or `*target`, which is useful for checking if a variable is of a specific type or a pointer to that type. +The function compares the type of the provided value (`src`) to a target type string (`target`), with an option for a wildcard `*` prefix (pointer). It returns `true` if `src` matches `target` or `*target`, which is useful for checking if a variable is of a specific type or a pointer to that type.
NameValue
Signature
TypeIsLike(target string, src any) bool
 
diff --git a/docs/registries/slices.md b/docs/registries/slices.md index 604089f..3e560ed 100644 --- a/docs/registries/slices.md +++ b/docs/registries/slices.md @@ -79,7 +79,7 @@ The function merges multiple lists into a single, unified list, combining all el ### chunk -The function divides a list into smaller, equally sized chunks based on the specified size, breaking the original list into manageable sublists. +The function divides a list into smaller, equally sized chunks based on the specified size, breaking the original list into manageable sub-lists.
NameValue
Signature
Chunk(size int, list any) ([][]any, error)
 
@@ -129,7 +129,7 @@ The function removes `nil` and zero-value elements from a list, leaving only non ### flatten -The function flattens a list into a single-dimensional array, removing nested lists andcombining all elements into a single list. +The function flattens a list into a single-dimensional array, removing nested lists and combining all elements into a single list.
NameValue
Signature
Flatten(list any) ([]any, error)
 
diff --git a/docs/registries/time.md b/docs/registries/time.md index dc1f022..1e8403a 100644 --- a/docs/registries/time.md +++ b/docs/registries/time.md @@ -115,7 +115,7 @@ The function returns the Unix epoch timestamp for a given date. ### dateModify -The function adjusts a given date by a specified duration, returning the modified date. If the duration format is incorrect, it returns the original date without any changes, in case of must version, an error are returned. +The function adjusts a given date by a specified duration, returning the modified date. If the duration format is incorrect, it returns the original date without any changes, in case of must version, an error is returned.
NameValue
Signature
DateModify(fmt string, date time.Time) (time.Time, error)
 
diff --git a/docs/roadmap-to-sprout-v1.0.md b/docs/roadmap-to-sprout-v1.0.md index 1f9975e..ca09c54 100644 --- a/docs/roadmap-to-sprout-v1.0.md +++ b/docs/roadmap-to-sprout-v1.0.md @@ -8,7 +8,7 @@ description: The roadmap to grow the sprout ## Key Objectives {% hint style="info" %} -All objectives are get from feedback, suggestions and personal knowledge. You can discuss about the v1.0 directly [in the issue on GitHub](https://github.com/go-sprout/sprout/issues/1). +All objectives comes from feedback, suggestions and personal knowledge. You can discuss the v1.0 directly [in the issue on GitHub](https://github.com/go-sprout/sprout/issues/1). {% endhint %} ### :white\_check\_mark: Minimize Dependencies - **DONE** @@ -24,7 +24,7 @@ Dependencies have been minimized and optimized across all registries. Provide comprehensive, easy-to-understand documentation that covers all functionalities, use cases, and examples to improve the developer experience. {% hint style="success" %} -This feature are implemented on v0.5.0, documentations can be found here: +These features are implemented on v0.5.0, documentations can be found here: You are on the official documentation site :tada: {% endhint %} @@ -48,7 +48,7 @@ Aim to minimize memory allocations as much as possible to alleviate the burden o Follow default go template error handling mechanisms for all functions to ensure that errors are managed gracefully and efficiently. {% hint style="success" %} -This feature are implemented on v0.6.0, documentation can be found here: +These features are implemented on v0.6.0, documentation can be found here: [safe-functions.md](features/safe-functions.md "mention") {% endhint %} @@ -62,7 +62,7 @@ Add a broader array of functions without imposing limitations, enabling users to Allow users to customize which functions to load into their runtime environment, preventing unnecessary resource consumption and enhancing performance. {% hint style="success" %} -This feature are implemented on v0.5.0, documentations can be found here: +These features are implemented on v0.5.0, documentations can be found here: [loader-system-registry.md](features/loader-system-registry.md "mention") @@ -71,10 +71,10 @@ This feature are implemented on v0.5.0, documentations can be found here: ### :white\_check\_mark: Function Aliasing - **DONE** -Enable the creation of aliases for functions outside of the library, providing flexibility and convenience in how functions are accessed and utilized. +Enable the creation of aliases for functions outside the library, providing flexibility and convenience in how functions are accessed and utilized. {% hint style="success" %} -This feature are implemented on v0.3.0, documentation can be found here : +These features are implemented on v0.3.0, documentation can be found here : [function-aliases.md](features/function-aliases.md "mention") {% endhint %} @@ -85,7 +85,7 @@ When you are a middle-app (between sprout and the user how write the template), The solution are to embed a notice system in the template library to warn the end-user of a deprecation and let x versions between the deprecation notice and the replacement / removal of the function. {% hint style="success" %} -This feature are implemented on v0.6.0, documentation can be found here :\ +These features are implemented on v0.6.0, documentation can be found here :\ [broken-reference](broken-reference/ "mention") {% endhint %} @@ -103,4 +103,4 @@ This page will be updated each time function are re-implemented correctly in Spr A list of functions wanted for v1 based on issues, pull requests from sprig, feedback on sprout. All functions listed here will be implemented for the v1. -
DONEFunctionsDescription
truetoYamlConvert a struct to a YAML String
truefromYamlConvert YAML String to a struct
truetoBoolConvert any to a boolean
truetoDurationConvert any to a time.Duration
truedefault,empty,coalesceDont trigger default go value as false
truedigDig into a map without crashes in format book.author.name
truesha512sumSupport of SHA512
truemd5sumSupport of md5 hash
truehasFieldDetect if a field are present in an object using reflect. Source
truetoDurationconvert a value to a time.Duration
truetoCamelCase, toPascalCase, toKebakCase, toDotCase, topathCase, toConstantCase,toSnakeCase,toTitleCaseA batch of functions to change casing of a string to aby casing you want.
truecapitalize, uncapitalizeCapitalize / Uncapitalize a string (Upper/lower only the first character)
trueflattenFlatten nested list be one level
trueregexpFindSubmatch, regexpAllSubmatches,regexpFindNamedSubmatch, regexpAllNamedSubmatchesCollection of function to found and retrieve submatches and named submatches
truecidr, ip, macA collection of functions for network ip manipulation
truetoLocalDateConvert to a time.Time with a timezone support
+
DONEFunctionsDescription
truetoYamlConvert a struct to a YAML String
truefromYamlConvert YAML String to a struct
truetoBoolConvert any to a boolean
truetoDurationConvert any to a time.Duration
truedefault,empty,coalesceDon't trigger default go value as false
truedigDig into a map without crashes in format book.author.name
truesha512sumSupport of SHA512
truemd5sumSupport of md5 hash
truehasFieldDetect if a field are present in an object using reflect. Source
truetoDurationconvert a value to a time.Duration
truetoCamelCase, toPascalCase, toKebakCase, toDotCase, topathCase, toConstantCase,toSnakeCase,toTitleCaseA batch of functions to change casing of a string to aby casing you want.
truecapitalize, uncapitalizeCapitalize / Uncapitalize a string (Upper/lower only the first character)
trueflattenFlatten nested list be one level
trueregexpFindSubmatch, regexpAllSubmatches,regexpFindNamedSubmatch, regexpAllNamedSubmatchesCollection of function to found and retrieve submatches and named submatches
truecidr, ip, macA collection of functions for network ip manipulation
truetoLocalDateConvert to a time.Time with a timezone support