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

initial imports support for golang #216

Merged
merged 3 commits into from
Feb 10, 2023
Merged

initial imports support for golang #216

merged 3 commits into from
Feb 10, 2023

Conversation

jhsinger-klotho
Copy link
Contributor

• Does any part of it require special attention?
• Does it relate to or fix any issue?

making some reusable imports logic for go, and using it within the expose plugin where possible

Standard checks

  • Unit tests: Any special considerations?
  • Docs: Do we need to update any docs, internal or public?
  • Backwards compatibility: Will this break existing apps? If so, what would be the extra work required to keep them working?

@DavidSeptimus
Copy link
Contributor

it looks like the current imports query doesn't support individual imports. e.g:

//detected
import (
    "abc"
    d "efg"
)

// not detected
import "abc"
import d "efg"

@jhsinger-klotho
Copy link
Contributor Author

it looks like the current imports query doesn't support individual imports. e.g:

//detected
import (
    "abc"
    d "efg"
)

// not detected
import "abc"
import d "efg"

yeah in expose we have a lot of logic about imports that are incorrect assumptions. I just wanted to at least move the base logic outside of that. Since our query doesnt currently support single imports i think we are relying on the fact that any ide for go will combine them into a single import block. We likely should improve on this, i may cut a completely new ticket for this though if thats ok

@github-actions
Copy link

github-actions bot commented Feb 9, 2023

Package Line Rate Health
github.com/klothoplatform/klotho/pkg/analytics 2%
github.com/klothoplatform/klotho/pkg/annotation 23%
github.com/klothoplatform/klotho/pkg/cli 4%
github.com/klothoplatform/klotho/pkg/core 21%
github.com/klothoplatform/klotho/pkg/env_var 82%
github.com/klothoplatform/klotho/pkg/exec_unit 54%
github.com/klothoplatform/klotho/pkg/infra/kubernetes 59%
github.com/klothoplatform/klotho/pkg/infra/kubernetes/helm 39%
github.com/klothoplatform/klotho/pkg/input 63%
github.com/klothoplatform/klotho/pkg/lang 38%
github.com/klothoplatform/klotho/pkg/lang/dockerfile 0%
github.com/klothoplatform/klotho/pkg/lang/golang 29%
github.com/klothoplatform/klotho/pkg/lang/javascript 47%
github.com/klothoplatform/klotho/pkg/lang/python 61%
github.com/klothoplatform/klotho/pkg/lang/yaml 0%
github.com/klothoplatform/klotho/pkg/logging 7%
github.com/klothoplatform/klotho/pkg/multierr 95%
github.com/klothoplatform/klotho/pkg/provider/aws 59%
github.com/klothoplatform/klotho/pkg/runtime 78%
github.com/klothoplatform/klotho/pkg/static_unit 33%
github.com/klothoplatform/klotho/pkg/validation 73%
github.com/klothoplatform/klotho/pkg/yaml_util 79%
Summary 41% (3875 / 9492)

@jhsinger-klotho jhsinger-klotho merged commit 11150ab into main Feb 10, 2023
@jhsinger-klotho jhsinger-klotho deleted the go_imports branch February 10, 2023 15:01
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