From 33f90a8c161473b8a4a7d45adc74219a5e5e2acd Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Wed, 10 Jan 2024 22:12:19 -0300 Subject: [PATCH] chore: add changelog and documentation for #1452 --- CHANGELOG.md | 3 +++ docs/docs/usage.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 982cf24e..11eee74d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ @pd93). - Small change on the API when using as a library: `call.Direct` became `call.Indirect` (#1459). +- Added new template function: `spew`, which can be used to print variables for + debugging purposes (#1452). + ## v3.33.1 - 2023-12-21 diff --git a/docs/docs/usage.md b/docs/docs/usage.md index 0083034d..6b162d68 100644 --- a/docs/docs/usage.md +++ b/docs/docs/usage.md @@ -1286,6 +1286,9 @@ Task also adds the following functions: for this. The Bash dialect is assumed. - `splitArgs`: Splits a string as if it were a command's arguments. Task uses [this Go function](https://pkg.go.dev/mvdan.cc/sh/v3@v3.4.0/shell#Fields) +- `spew`: Returns the Go representation of a specific variable. Useful for + debugging. Uses the [davecgh/go-spew](https://github.com/davecgh/go-spew) + package. Example: