Documentation ¶
Overview ¶
This package are used to store all helpers functions used to validate and log deprecated functions and signatures in the project codebase. This is really useful to ensure no breaking changes are introduced from the migration of Sprig to Sprout.
This package will be removed when no deprecated functions are left in the project codebase (scheduled for v1.1).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrArgsCount ¶
ErrArgsCount returns an error message about the number of arguments expected and received.
Parameters:
expected int - the number of arguments expected. got int - the number of arguments received.
Returns:
error - the error message.
Example:
deprecated.ErrArgsCount(2, 3) // Output: "expected 2 arguments, got 3"
func SignatureWarn ¶
SignatureWarn logs a warning message about a deprecated function signature.
Parameters:
l *slog.Logger - the logger to use. functionName string - the name of the function. oldSign string - the old signature of the function. newSign string - the new signature of the function.
Example:
deprecated.SignatureWarn(l, "get", "{{ get dict key }}", "{{ dict | get key }}")
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.