Skip to content

Commit

Permalink
chore(clean): remove unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
metal3d committed Nov 25, 2024
1 parent 046410a commit 36984e3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
11 changes: 0 additions & 11 deletions generator/configMap.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,6 @@ const (
FileMapUsageFiles // files in a configmap.
)

// NewFileMap creates a new DataMap from a compose service. The appName is the name of the application taken from the project name.
func NewFileMap(service types.ServiceConfig, appName, kind string) DataMap {
switch kind {
case "configmap":
return NewConfigMap(service, appName, true)
default:
log.Fatalf("Unknown filemap kind: %s", kind)
}
return nil
}

// only used to check interface implementation
var (
_ DataMap = (*ConfigMap)(nil)
Expand Down
17 changes: 0 additions & 17 deletions generator/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,23 +397,6 @@ func addMainTagAppDoc(values []byte, project *types.Project) []byte {
return []byte(strings.Join(lines, "\n"))
}

// addModeline adds a modeline to the values.yaml file to make sure that vim
// will use the correct syntax highlighting.
func addModeline(values []byte) []byte {
modeline := "# vi" + "m: ft=helm.gotmpl.yaml"

// if the values ends by `{{- end }}` we need to add the modeline before
lines := strings.Split(string(values), "\n")

if lines[len(lines)-1] == "{{- end }}" || lines[len(lines)-1] == "{{- end -}}" {
lines = lines[:len(lines)-1]
lines = append(lines, modeline, "{{- end }}")
return []byte(strings.Join(lines, "\n"))
}

return append(values, []byte(modeline)...)
}

func addResourceHelp(values []byte) []byte {
lines := strings.Split(string(values), "\n")
for i, line := range lines {
Expand Down

0 comments on commit 36984e3

Please sign in to comment.