Skip to content

Commit

Permalink
doc(filter): fix the spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
graugans committed May 15, 2024
1 parent a61a88a commit 3c2d4d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/filter.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Using Go text/template for Advanced Data Filtering

This document demonstrates the usage of the Go text/template package to filter and format the output of the `ovp8xx get` command for manipulating the result data. There ar two custom functions created to enhance the filtering: `prefix` and `toJSON`.
This document demonstrates the usage of the Go text/template package to filter and format the output of the `ovp8xx get` command for manipulating the result data. There are two custom functions created to enhance the filtering: `prefix` and `toJSON`.

## The `prefix` Function

The `prefix` function is designed to solve the problem of trailing commas, which are for example not allowed in JSON. The idea is to prefix each line with a comma, except for the very first one. This function is particularly useful when generating JSON output dynamically, where the number of elements may vary.
The `prefix` function is designed to solve the problem of trailing commas, which are, for example, not allowed in JSON. The idea is to prefix each line with a comma, except for the very first one. This function is particularly useful when generating JSON output dynamically, where the number of elements may vary.

Here's how it's used in the command:

Expand Down

0 comments on commit 3c2d4d8

Please sign in to comment.