Within a go
package named kubesecretsPkg
I declare the following two struct types:
type KubesecretsOpts struct {
FullPathToRepo string
FullPathToApp string
}
type KubesecretsSetOpts struct {
KubesecretsOpts
Variable string
Value string
}
I am trying to initialise an outer (KubesecretsSetOpts
) in another package as follows:
kSetOpts := kubesecretsPkg.KubesecretsSetOpts{
kubesecretsPkg.KubesecretsOpts: {
FullPathToRepo: fullPathToRepo,
FullPathToApp: fullPathToApp,
},
Variable: variable,
Value: value,
}
this fails as follows:
Why am I not able to directly initialise an embedded struct?