mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 21:27:10 +00:00
chore: added comment explaning why ...string
This commit is contained in:
@@ -317,6 +317,8 @@ type secretArguments struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func secretTemplateFunction(accessToken string, existingEtag string, currentEtag *string) func(string, string, string, ...string) ([]models.SingleEnvironmentVariable, error) {
|
func secretTemplateFunction(accessToken string, existingEtag string, currentEtag *string) func(string, string, string, ...string) ([]models.SingleEnvironmentVariable, error) {
|
||||||
|
// ...string is because golang doesn't have optional arguments.
|
||||||
|
// thus we make it slice and pick it only first element
|
||||||
return func(projectID, envSlug, secretPath string, args ...string) ([]models.SingleEnvironmentVariable, error) {
|
return func(projectID, envSlug, secretPath string, args ...string) ([]models.SingleEnvironmentVariable, error) {
|
||||||
var parsedArguments secretArguments
|
var parsedArguments secretArguments
|
||||||
// to make it optional
|
// to make it optional
|
||||||
|
|||||||
Reference in New Issue
Block a user