fix(doc): Follow Go recommendations

This commit is contained in:
2025-06-26 23:53:05 +02:00
parent 72bc88661a
commit a3d1e9342f
5 changed files with 16 additions and 12 deletions

View File

@@ -1,14 +1,17 @@
/*
The generator package generates kubernetes objects from a "compose" file and transforms them into a helm chart.
Package generator generates kubernetes objects from a "compose" file and transforms them into a helm chart.
The generator package is the core of katenary. It is responsible for generating kubernetes objects from a compose file and transforming them into a helm chart.
Conversion manipulates Yaml representation of kubernetes object to add conditions, labels, annotations, etc. to the objects. It also create the values to be set to
the values.yaml file.
The generator package is the core of katenary. It is responsible for generating kubernetes objects from a compose file
and transforming them into a helm chart.
Conversion manipulates Yaml representation of kubernetes object to add conditions, labels, annotations, etc. to the
objects. It also create the values to be set to the values.yaml file.
The generate.Convert() create an HelmChart object and call "Generate()" method to convert from a compose file to a helm chart.
It saves the helm chart in the given directory.
The generate.Convert() create an HelmChart object and call "Generate()" method to convert from a compose file to a helm
chart. It saves the helm chart in the given directory.
If you want to change or override the write behavior, you can use the HelmChart.Generate() function and implement your own write function. This function returns
the helm chart object containing all kubernetes objects and helm chart ingormation. It does not write the helm chart to the disk.
If you want to change or override the write behavior, you can use the HelmChart.Generate() function and implement your
own write function. This function returns
the helm chart object containing all kubernetes objects and helm chart ingormation. It does not write the helm chart to
the disk.
*/
package generator

View File

@@ -1,2 +1,2 @@
/* extrafiles package provides function to generate the Chart files that are not objects. Like README.md and notes.txt... */
/* Package extrafiles provides function to generate the Chart files that are not objects. Like README.md and notes.txt... */
package extrafiles

View File

@@ -1,4 +1,4 @@
// Parser package is a wrapper around compose-go to parse compose files.
// Package parser is a wrapper around compose-go to parse compose files.
package parser
import (

View File

@@ -1,2 +1,3 @@
// Utils package provides some utility functions used in katenary. It defines some constants and functions used in the whole project.
// Package utils provides some utility functions used in katenary.
// It defines some constants and functions used in the whole project.
package utils

View File

@@ -90,7 +90,7 @@ func GetContainerByName(name string, containers []corev1.Container) (*corev1.Con
return nil, -1
}
// GetContainerByName returns a container by name and its index in the array.
// TplValue returns a container by name and its index in the array.
func TplValue(serviceName, variable string, pipes ...string) string {
if len(pipes) == 0 {
return `{{ tpl .Values.` + serviceName + `.` + variable + ` $ }}`