owncloud / owncloud/ocis

Remove config struct from `ocis/pkg/init/init.go`

Open
#3,644 3 comments 0 reactions 0 assignees View on GitHub
Category:Enhancement Estimation:L(5) Priority:p3-medium Type:Technical-Debt
Dominant language
Go
Stars
2.1k
Forks
274
Avg merge
2d 1h
Merged PRs (30d)
103

Description

There is a structure representing the needed configuration variables in `ocis/pkg/init/init.go`.
We have two use-cases where we need to output the configuration variables: `ocis init` and when generating a list of all available environment variables for the docs (see `docs/helpers/configenvextractor.go` for details).
The problem is that the yaml package has no option to ignore the `omitempty`-tag when run, this would either result in a unusable `ocis.yaml` when generating the default config with `ocis init` or missing variables in the lists the `configextractor.go` generates.

We need to remove the said structure and replace it with a mechanism that can give us both solutions from the structs present in the source code.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.