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

Satisfy the golang compiler. #221

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

okanaganrusty
Copy link

This satisfies the errors generated by the event hook generators (line numbers may vary 🧷)

internal/ent/generated/eventhooks/hooks.go:287:6: dbObj declared and not used
internal/ent/generated/eventhooks/hooks.go:467:6: dbObj declared and not used
internal/ent/generated/eventhooks/hooks.go:779:6: dbObj declared and not used
internal/ent/generated/eventhooks/hooks.go:1069:6: dbObj declared and not used
internal/ent/generated/eventhooks/hooks.go:1579:6: dbObj declared and not used

@okanaganrusty okanaganrusty requested a review from a team as a code owner April 5, 2024 18:01
Signed-off-by: Russell McConnachie <[email protected]>
Signed-off-by: Russell McConnachie <[email protected]>
@okanaganrusty okanaganrusty force-pushed the satisfy-dbobj-error-in-eventhook-tmpl branch from ea0fdae to 9d0c2d4 Compare April 5, 2024 18:41
@@ -163,6 +163,9 @@
return nil, fmt.Errorf("failed to load object to get values for event, err %w", err)
}

// Satisfies the go error: dbObj declared and not used
Copy link

Choose a reason for hiding this comment

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

It does, but the better answer seems to be not to create dbObj if len($node.Fields) is 0, versus faking an access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants