Jesse Simpson
d10c5f6429
style: trim space from formatted error messages
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
0e0a8cc765
fix: address no-template-associated type of error
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
013f27c294
fix: use errors.New instead of fmt.Errorf
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
868cdc261f
refactor: reduce flow-control operations
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
48922e21d1
refactor: use struct equality instead of comparing each composition
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
ac98e977c3
refactor: switch to while loop instead of for to reduce unnecessary variables
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
65084371c9
refactor: replace if MatchString with FindStringSubMatch
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
782f6c6409
refactor: shorten regex subexp syntax
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
4b9a9ecaf6
refactor: rename function and add doc-string
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
4f63c73353
refactor: remove impractical safety check
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
5202820f2f
refactor: define regexs at package scope
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
cbdc22128e
refactor: use strings.Builder instead of string concatenation
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
cdcf1bc601
style: remove unnecessary break
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
3cc4cb60ba
refactor: prevent duplicates being inserted rather than post-filtering
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
deea4a0d0e
refactor: remove more unnecessary format calls
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
13b232e061
refactor: make use of regexs for err parsing
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
daf4c34879
fix: use originalErr instead of formatting original error
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
98da3e28b6
fix: add some index checking and fixed a test that relied on type-checking
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
487f72b822
fix: added protection against while-true condition in unbounded for loop
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
6bb836374b
test: adjusted to make it more meaningful and to pass
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
383a758aec
fix: add quality checks to ensure formatted error doesnt remove important info
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
d8bec4e30f
fix: remove comparison from old error message to new
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
c481470985
style: renamed i variable for consistency
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
2e3f6dce28
fix: save to fileLocation rather than fileLocations[i] which gets overwritten
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
f09bbb8ab8
style: consolidate for loops
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
1357db4db1
style: removed variable only used once
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
a56daca82b
style: use interface functions instead of inline logic
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
87f9e2dc45
style: create String function for TraceableError representing one chunk of a stacktrace
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
6cd0c0082a
fix: split up the multiline errors to be more vertical
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
cc477e9f79
fix: adjust test to not require external chart
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Jesse Simpson
14f902c245
wip: draft at making cleaner stacktraces
...
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
7 months ago
Justen Stall
280a9ddbdb
Merge branch 'main' into stdlib-errors-2
...
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
7 months ago
Stepan Paksashvili
b54349d9b2
fix(pkg/engine): allow to override all functions
...
Signed-off-by: Stepan Paksashvili <stepan.paksashvili@flant.com>
7 months ago
Stepan Paksashvili
8982b57e5e
feat(pkg/engine): and custom funcs overriding test
...
Signed-off-by: Stepan Paksashvili <stepan.paksashvili@flant.com>
7 months ago
Stepan Paksashvili
9073bcf53e
feat(pkg/engine): add support for custom template funcs
...
Enhances the template engine and action config to allow users to inject custom template functions via an action config when using Helm as a library.
Closes #30733
Signed-off-by: Stepan Paksashvili <stepan.paksashvili@flant.com>
7 months ago
Robert Sirchia
c5991028e0
fixing matts changes
...
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
8 months ago
Robert Sirchia
4422000330
fixing case issues with the logging of my errors
...
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
9 months ago
Robert Sirchia
848c134e0c
fixing error messages
...
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
9 months ago
Robert Sirchia
c2e6ed8ae5
fixing build error
...
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
9 months ago
Robert Sirchia
8887d01791
fixing issues with my PR
...
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
9 months ago
Robert Sirchia
c36bc25fb1
fixing missing attributes
...
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
9 months ago
Robert Sirchia
1ad79a2bb7
converting inline log to slog
...
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
9 months ago
Matt Farina
61d3eca55c
Move pkg/chart to pkg/chart/v2 to prepare for v3 charts
...
This change moves the code, updates the import locations, and
adds a doc.go file to document what the v2 package is for.
This is part of HIP 20 for v3 charts
Signed-off-by: Matt Farina <matt.farina@suse.com>
9 months ago
Matt Farina
5c0deec327
Moving chartutil to chart/util
...
chartutil was originally created to operate on protobufs which are
no longer part of Helm. The util package makes more sense to be
part of the chart package.
This change is part of the HIP 20 to create v3 charts and
explicitly call out v2 charts. The changes for this are in smaller
bite size changes.
Signed-off-by: Matt Farina <matt.farina@suse.com>
9 months ago
Matt Farina
2236294119
Updating to helm.sh/helm/v4
...
Since Helm is going through breaking changes with Helm v4, the version path to
Helm needs to be updated.
Signed-off-by: Matt Farina <matt.farina@suse.com>
11 months ago
Matt Farina
5727f56a96
Update to Go 1.23
...
Multiple changes were made to pass linting. Some Go built-in names
are being used for variables (e.g., min). This happens in the Go
source itself including the Go standard library and is not always
a bad practice.
To handle allowing some built-in names to be used the linter config
is updated to allow (via opt-in) some names to pass. This allows us
to still check for re-use of Go built-in names and opt-in to any
new uses.
There were also several cases where a value was checked for nil
before checking its length when this is already handled by len()
or the types default value. These were cleaned up.
The license validation was updated because it was checking everything
in the .git directory including all remote content that was local.
The previous vendor directory was from a time prior to Go modules
when Helm handled dependencies differently. It was no longer needed.
Signed-off-by: Matt Farina <matt.farina@suse.com>
11 months ago
Justen Stall
63cf42a843
fix: replace "github.com/pkg/errors" with stdlib "errors" package
...
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
1 year ago
Nathan Baulch
ff9dd262e3
Fix typos
...
Signed-off-by: Nathan Baulch <nathan.baulch@gmail.com>
1 year ago
Robert Sirchia
d58d7b3762
Fixing all the linting errors
...
Cleaned up all the linting errors we are getting.
Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
2 years ago
Matt Farina
7fd08041b1
Merge pull request #12617 from porridge/dynamic-client
...
feature(pkg/engine): introduce RenderWithClientProvider
2 years ago