Skip to content

Commit

Permalink
Added the comments for better maintainability going forward
Browse files Browse the repository at this point in the history
  • Loading branch information
prafull01 committed Sep 14, 2020
1 parent 7d805fa commit ae06d8c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/model/resource/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,11 @@ func (opts *Options) NewResource(c *config.Config, doResource bool) *Resource {

res.Package = pkg
res.Domain = opts.Group
if domain != "" && res.Domain != "" {
if domain != "" && opts.Group != "" {
res.Domain += "." + domain
} else if opts.Group == "" {
// Empty group overrides the default values provided by newResource(). GroupPackageName and ImportAlias includes
// domain instead of group name as user provided group is empty.
res.Domain = domain
res.GroupPackageName = opts.safeImport(domain)
res.ImportAlias = opts.safeImport(domain + opts.Version)
Expand Down

0 comments on commit ae06d8c

Please sign in to comment.