@@ -17,7 +17,6 @@ package chartutil
1717import (
1818 "bytes"
1919 "fmt"
20- "io/ioutil"
2120 "os"
2221 "path/filepath"
2322
@@ -52,7 +51,7 @@ type Options struct {
5251// NewChart creates a new helm chart for the project from helm's default template.
5352// It returns a chart.Chart that references the newly created chart or an error.
5453func NewChart (name string ) (* chart.Chart , error ) {
55- tmpDir , err := ioutil . TempDir ("" , "osdk-helm-chart" )
54+ tmpDir , err := os . MkdirTemp ("" , "osdk-helm-chart" )
5655 if err != nil {
5756 return nil , err
5857 }
@@ -86,22 +85,22 @@ func NewChart(name string) (*chart.Chart, error) {
8685// If opts.Repo is not specified, the following chart reference formats are supported:
8786//
8887// - <repoName>/<chartName>: Fetch the helm chart named chartName from the helm
89- // chart repository named repoName, as specified in the
90- // $HELM_HOME/repositories/repositories.yaml file.
88+ // chart repository named repoName, as specified in the
89+ // $HELM_HOME/repositories/repositories.yaml file.
9190//
9291// - <url>: Fetch the helm chart archive at the specified URL.
9392//
9493// If opts.Repo is specified, only one chart reference format is supported:
9594//
9695// - <chartName>: Fetch the helm chart named chartName in the helm chart repository
97- // specified by opts.Repo
96+ // specified by opts.Repo
9897//
9998// If opts.Version is not set, it will fetch the latest available version of the helm
10099// chart. Otherwise, it will fetch the specified version.
101100// opts.Version is not used when opts.Chart itself refers to a specific version, for
102101// example when it is a local path or a URL.
103102func LoadChart (opts Options ) (* chart.Chart , error ) {
104- tmpDir , err := ioutil . TempDir ("" , "osdk-helm-chart" )
103+ tmpDir , err := os . MkdirTemp ("" , "osdk-helm-chart" )
105104 if err != nil {
106105 return nil , err
107106 }
@@ -152,7 +151,7 @@ func downloadChart(destDir string, opts Options) (string, error) {
152151
153152// ScaffoldChart scaffolds the provided chart.Chart to a known directory relative to projectDir
154153//
155- // It also fetches the dependencies and reloads the chart.Chart
154+ // # It also fetches the dependencies and reloads the chart.Chart
156155//
157156// It returns the reloaded chart, the relative path, or an error.
158157func ScaffoldChart (chrt * chart.Chart , projectDir string ) (* chart.Chart , string , error ) {
0 commit comments