Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add default properties for company object #24

Merged
merged 4 commits into from
Nov 13, 2023

Conversation

kk-no
Copy link
Member

@kk-no kk-no commented Nov 9, 2023

What to do

  • Fill in default properties for Company.
  • Add tools to generate models from field lists (CSV) that can be exported from HubSpot.

Background

Followup #23

Acceptance criteria

@kk-no kk-no added the enhancement New feature or request label Nov 9, 2023
@kk-no kk-no requested a review from a team November 9, 2023 01:33
@kk-no kk-no self-assigned this Nov 9, 2023
Makefile Outdated

.PHONY: generate
generate: ## generate go code (e.g. make generate OBJECT=Contact FILEPATH=contact.csv)
cd $(TOOLS)/model_generator && go run model_gen.go $(OBJECT) $(FILEPATH)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cd $(TOOLS)/model_generator && go run model_gen.go $(OBJECT) $(FILEPATH)
@cd $(TOOLS)/model_generator && go run model_gen.go $(OBJECT) $(FILEPATH)

### Sample

```shell
$ make generate OBJECT=Contact FILEPATH=contact.csv
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[opt] maybe good to add sample contact.csv file?

log.Printf("Running with arges: %s\n", os.Args[1:]) // Without command name.

if len(os.Args) != 3 {
log.Fatal("Missing required parameters: <objectName> <csvFilePath>")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think cli tool is better not to use log, but use fmt.Print* because log has date&time prefix.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kk-no kk-no merged commit 4f48fed into main Nov 13, 2023
2 checks passed
@kk-no kk-no deleted the add-default-properties-for-company-object branch November 13, 2023 00:58
joidegn pushed a commit to joidegn/go-hubspot that referenced this pull request Dec 13, 2023
…es-for-company-object

Add default properties for company object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants