Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Different behavior when running main.go directly #266

Open
1 task done
Shion1305 opened this issue Sep 11, 2024 · 0 comments
Open
1 task done

[Bug]: Different behavior when running main.go directly #266

Shion1305 opened this issue Sep 11, 2024 · 0 comments
Assignees
Labels
bug Something isn't working triage Issues that need to be triaged and categorized

Comments

@Shion1305
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When running main.go directly by go run ../cmd/helm-docs in the example folder, the following diff occur.

In most cases, the last lines are omitted. However, this issue does not occur when running the binary downloaded via brew or aqua.
Basically last lines are omitted in most cases.
However, when running from binary available from brew or aqua, this behavior does not occur.

First 100 lines of diff
diff --git a/example-charts/best-values-example/README.md b/example-charts/best-values-example/README.md
index 10ff8dd..08c5103 100644
--- a/example-charts/best-values-example/README.md
+++ b/example-charts/best-values-example/README.md
@@ -30,5 +30,3 @@ One of the best values parsing example charts here, exhibits several more compli
 | statefulset.livenessProbe | object | `{"enabled":false}` | Configure the healthcheck for the database |
 | statefulset.podLabels | object | `{}` | The labels to be applied to instances of the database |
 
-----------------------------------------------
-Autogenerated from chart metadata using [helm-docs v1.14.0](https://github.com/norwoodj/helm-docs/releases/v1.14.0)
diff --git a/example-charts/custom-template/README.md b/example-charts/custom-template/README.md
index 8e4a6a6..bcde41b 100644
--- a/example-charts/custom-template/README.md
+++ b/example-charts/custom-template/README.md
@@ -6,57 +6,3 @@ Basically the same as the nginx-ingress chart, but using a custom template to in
 
 ## Additional Information
 
-```
-          ,-.
- ,     ,-.   ,-.
-/ \   (   )-(   )
-\ |  ,.>-(   )-<
- \|,' (   )-(   )
-  Y ___`-'   `-'
-  |/__/   `-'
-  |
-  |
-  |    -hi-
-__|_____________
-```
-
-Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
-et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
-aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
-cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
-culpa qui officia deserunt mollit anim id est laborum.
-
-## Installing the Chart
-
-To install the chart with the release name `my-release`:
-
-```console
-$ helm repo add foo-bar http://charts.foo-bar.com
-$ helm install my-release foo-bar/custom-template
-```
-
-## Requirements
-
-| Repository | Name | Version |
-|------------|------|---------|
-| @stable | nginx-ingress | 0.22.1 |
-
-## Values
-
-| Key | Type | Default | Description |
-|-----|------|---------|-------------|
-| controller.extraVolumes[0].configMap.name | string | `"nginx-ingress-config"` | Uses the name of the configmap created by this chart |
-| controller.extraVolumes[0].name | string | `"config-volume"` |  |
-| controller.image.repository | string | `"nginx-ingress-controller"` |  |
-| controller.image.tag | string | `"18.0831"` |  |
-| controller.ingressClass | string | `"nginx"` | Name of the ingress class to route through this controller |
-| controller.name | string | `"controller"` |  |
-| controller.persistentVolumeClaims | list | the chart will construct this list internally unless specified | List of persistent volume claims to create. For very long comments, break them into multiple lines. |
-| controller.podLabels | object | `{}` | The labels to be applied to instances of the controller pod |
-| controller.publishService.enabled | bool | `false` | Whether to expose the ingress controller to the public world |
-| controller.replicas | int | `nil` | Number of nginx-ingress pods to load balance between |
-| controller.service.annotations."external-dns.alpha.kubernetes.io/hostname" | string | `"stupidchess.jmn23.com"` | Hostname to be assigned to the ELB for the service |
-| controller.service.type | string | `"LoadBalancer"` |  |
-
-----------------------------------------------
-Autogenerated from chart metadata using [helm-docs v1.14.0](https://github.com/norwoodj/helm-docs/releases/v1.14.0)
diff --git a/example-charts/custom-value-notation-type/README.md b/example-charts/custom-value-notation-type/README.md
index 48c8119..6c9b7bd 100644
--- a/example-charts/custom-value-notation-type/README.md
+++ b/example-charts/custom-value-notation-type/README.md
@@ -1104,5 +1104,3 @@ string
 	</tbody>
 </table>
 
-----------------------------------------------
-Autogenerated from chart metadata using [helm-docs v1.14.0](https://github.com/norwoodj/helm-docs/releases/v1.14.0)
diff --git a/example-charts/dos-line-endings/README.md b/example-charts/dos-line-endings/README.md
index a314c39..e0701c4 100644
--- a/example-charts/dos-line-endings/README.md
+++ b/example-charts/dos-line-endings/README.md
@@ -13,5 +13,3 @@ A chart whose values file has dos line endings rather than unix ones
 | livenessProbe.httpGet.path | string | `"/healthz"` | This is the liveness check endpoint |
 | livenessProbe.httpGet.port | string | `"http"` |  |
 
-----------------------------------------------
-Autogenerated from chart metadata using [helm-docs v1.14.0](https://github.com/norwoodj/helm-docs/releases/v1.14.0)
diff --git a/example-charts/files-values/README.md b/example-charts/files-values/README.md
index 60e7a7f..70a915d 100644
--- a/example-charts/files-values/README.md
+++ b/example-charts/files-values/README.md
@@ -47,11 +47,11 @@ dataSecret:
   resource2.yaml: c29tZToKICByZXNvdXJjZTogImJsYWgyIg==
 ```
 

Expected Behavior

  • No diff occurs when running main.go directly by go run ../cmd/helm-docs in the example folder.
  • No different behavior between binary distribution and running via go install

Reference Chart

Charts in example folder

Reference Template

No response

Environment

  • Operating system:
  • Helm version (output of helm version): latest version
  • GO version (output of go version): 1.23
  • Method of calling helm-docs (manual, jenkins, github action ...): from go run, go build
  • MacBook Pro M2 Pro

Link to helm-docs Logs

No response

Further Information

No response

@Shion1305 Shion1305 added bug Something isn't working triage Issues that need to be triaged and categorized labels Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Issues that need to be triaged and categorized
Projects
None yet
Development

No branches or pull requests

3 participants