Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
d502f7c8
Unverified
Commit
d502f7c8
authored
Apr 24, 2018
by
Matthew Fisher
Committed by
GitHub
Apr 24, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3950 from BarryWilliams/issue3747
Add comments to fix linter issues
parents
7a65f747
71857803
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
files.go
pkg/chartutil/files.go
+4
-2
No files found.
pkg/chartutil/files.go
View file @
d502f7c8
...
@@ -211,7 +211,8 @@ func ToToml(v interface{}) string {
...
@@ -211,7 +211,8 @@ func ToToml(v interface{}) string {
// always return a string, even on marshal error (empty string).
// always return a string, even on marshal error (empty string).
//
//
// This is designed to be called from a template.
// This is designed to be called from a template.
func
ToJson
(
v
interface
{})
string
{
// TODO: change the function signature in Helm 3
func
ToJson
(
v
interface
{})
string
{
// nolint
data
,
err
:=
json
.
Marshal
(
v
)
data
,
err
:=
json
.
Marshal
(
v
)
if
err
!=
nil
{
if
err
!=
nil
{
// Swallow errors inside of a template.
// Swallow errors inside of a template.
...
@@ -226,7 +227,8 @@ func ToJson(v interface{}) string {
...
@@ -226,7 +227,8 @@ func ToJson(v interface{}) string {
// JSON documents. Additionally, because its intended use is within templates
// JSON documents. Additionally, because its intended use is within templates
// it tolerates errors. It will insert the returned error message string into
// it tolerates errors. It will insert the returned error message string into
// m["Error"] in the returned map.
// m["Error"] in the returned map.
func
FromJson
(
str
string
)
map
[
string
]
interface
{}
{
// TODO: change the function signature in Helm 3
func
FromJson
(
str
string
)
map
[
string
]
interface
{}
{
// nolint
m
:=
map
[
string
]
interface
{}{}
m
:=
map
[
string
]
interface
{}{}
if
err
:=
json
.
Unmarshal
([]
byte
(
str
),
&
m
);
err
!=
nil
{
if
err
:=
json
.
Unmarshal
([]
byte
(
str
),
&
m
);
err
!=
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment