mirror of https://github.com/helm/helm.git
could use strings.ReplaceAll instead
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
This commit is contained in:
parent
a6d0335bbb
commit
1654664b78
|
@ -92,5 +92,5 @@ func update(filename string, in []byte) error {
|
|||
}
|
||||
|
||||
func normalize(in []byte) []byte {
|
||||
return bytes.Replace(in, []byte("\r\n"), []byte("\n"), -1)
|
||||
return bytes.ReplaceAll(in, []byte("\r\n"), []byte("\n"))
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ func (o *docsOptions) run(_ io.Writer) error {
|
|||
hdrFunc := func(filename string) string {
|
||||
base := filepath.Base(filename)
|
||||
name := strings.TrimSuffix(base, path.Ext(base))
|
||||
title := cases.Title(language.Und, cases.NoLower).String(strings.Replace(name, "_", " ", -1))
|
||||
title := cases.Title(language.Und, cases.NoLower).String(strings.ReplaceAll(name, "_", " "))
|
||||
return fmt.Sprintf("---\ntitle: \"%s\"\n---\n\n", title)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue