carvel-dev / carvel-dev/ytt

Golang Intergartion with ytt

Open
#783 2 comments 0 reactions 0 assignees View on GitHub
helping with an issue
Dominant language
Go
Stars
1.9k
Forks
167
PR merge metrics
No merged PRs in 30d

Description

I am trying to generate data/values dynamically using golang

Current Code :
```
dvs := []string{"x=hello", "y=world"}
templatingOptions := yttcmd.NewOptions()

input, err := templatesAsInput(tpl...)
if err != nil {
return "", err
}

templatingOptions.DataValuesFlags.KVsFromYAML = dvs
```
Is there is way where I can pass a data values directly via structure or map in golang ?

If there is any, pls share the code snippet.

Contributor guide

Open the contributing guide

Research direction

Start with the Go example in the issue and inspect yttcmd.NewOptions and DataValuesFlags.KVsFromYAML to identify the existing data-values input path. Determine whether a structure or map can be passed through the Go API, and document or implement the supported approach with a focused example and test; the issue is done when direct structured input is clearly supported or ruled out.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.