diff --git a/generator/doc.go b/generator/doc.go index 90332ae..ee61f59 100644 --- a/generator/doc.go +++ b/generator/doc.go @@ -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 diff --git a/generator/extrafiles/doc.go b/generator/extrafiles/doc.go index 5033525..5330c36 100644 --- a/generator/extrafiles/doc.go +++ b/generator/extrafiles/doc.go @@ -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 diff --git a/parser/main.go b/parser/main.go index b0548dd..c5445b6 100644 --- a/parser/main.go +++ b/parser/main.go @@ -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 ( diff --git a/utils/doc.go b/utils/doc.go index b3896e7..031a733 100644 --- a/utils/doc.go +++ b/utils/doc.go @@ -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 diff --git a/utils/utils.go b/utils/utils.go index ab4ba59..6ebd5ab 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -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 + ` $ }}`