Skip to content

Commit

Permalink
Adding doc comments (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
bendbennett committed Sep 5, 2023
1 parent 8a29f65 commit d1832fb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/output/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ func WriteDataSources(dataSourcesSchema, dataSourcesModels, dataSourcesModelObje
return nil
}

// WriteResources uses the packageName to determine whether to create a directory and package per resource.
// If packageName is an empty string, this indicates that the flag was not set, and the default behaviour is
// then to create a package and directory per resource. If packageName is set then all generated code is
// placed into the same directory and package.
func WriteResources(resourcesSchema, resourcesModels, resourcesModelObjectHelpers, resourcesToFrom map[string][]byte, outputDir, packageName string) error {
for k, v := range resourcesSchema {
dirName := ""
Expand Down Expand Up @@ -103,6 +107,10 @@ func WriteResources(resourcesSchema, resourcesModels, resourcesModelObjectHelper
return nil
}

// WriteProviders uses the packageName to determine whether to create a directory and package for the provider.
// If packageName is an empty string, this indicates that the flag was not set, and the default behaviour is
// then to create a package and directory for the provider. If packageName is set then all generated code is
// placed into the same directory and package.
func WriteProviders(providersSchema, providerModels, providerModelObjectHelpers, providerToFrom map[string][]byte, outputDir, packageName string) error {
for k, v := range providersSchema {
dirName := ""
Expand Down

0 comments on commit d1832fb

Please sign in to comment.