You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by "surapuramakhil (via GitHub)" <gi...@apache.org> on 2024/01/23 01:04:22 UTC
[D] Why Every Import in this project starting with github.com/apache/ [incubator-answer]
GitHub user surapuramakhil created a discussion: Why Every Import in this project starting with github.com/apache/
I am curios to know why every file is getting imported from here https://pkg.go.dev/github.com/apache/incubator-answer@v1.2.1
why import are like this
```go
import (
"github.com/apache/incubator-answer/internal/base/conf"
```
instead of
```go
import (
"internal/base/conf"
```
or
```go
import (
"./internal/base/conf"
```
GitHub link: https://github.com/apache/incubator-answer/discussions/740
----
This is an automatically sent email for commits@answer.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@answer.apache.org
Re: [D] Why Every Import in this project starting with github.com/apache/ [incubator-answer]
Posted by "surapuramakhil (via GitHub)" <gi...@apache.org>.
GitHub user surapuramakhil added a comment to the discussion: Why Every Import in this project starting with github.com/apache/
any particular reason for starting with github.com/apache instead of org/Apache?
GitHub link: https://github.com/apache/incubator-answer/discussions/740#discussioncomment-8255802
----
This is an automatically sent email for commits@answer.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@answer.apache.org
Re: [D] Why Every Import in this project starting with github.com/apache/ [incubator-answer]
Posted by "surapuramakhil (via GitHub)" <gi...@apache.org>.
GitHub user surapuramakhil edited a comment on the discussion: Why Every Import in this project starting with github.com/apache/
Thank exactly is my concern. me as a developer might be in a confused state from where this import is coming from? via Internet or via codebase.
Especially in a situation where you are making code changes and saving those files but those are not getting reflected.
GitHub link: https://github.com/apache/incubator-answer/discussions/740#discussioncomment-8256085
----
This is an automatically sent email for commits@answer.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@answer.apache.org
Re: [D] Why Every Import in this project starting with github.com/apache/ [incubator-answer]
Posted by "Sirivasv (via GitHub)" <gi...@apache.org>.
GitHub user Sirivasv added a comment to the discussion: Why Every Import in this project starting with github.com/apache/
Not a specific one but in general a lot of things get easier for reference when the module name is also a HTTP/S URL for a repository
GitHub link: https://github.com/apache/incubator-answer/discussions/740#discussioncomment-8255893
----
This is an automatically sent email for commits@answer.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@answer.apache.org
Re: [D] Why Every Import in this project starting with github.com/apache/ [incubator-answer]
Posted by "surapuramakhil (via GitHub)" <gi...@apache.org>.
GitHub user surapuramakhil added a comment to the discussion: Why Every Import in this project starting with github.com/apache/
Thank exactly is my concern. me as a developer might be in a confused state form where this import is coming from? via Internet or via codebase.
Especially in a situation where you are making code changes and saving those files but those are not getting reflected.
GitHub link: https://github.com/apache/incubator-answer/discussions/740#discussioncomment-8256085
----
This is an automatically sent email for commits@answer.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@answer.apache.org
Re: [D] Why Every Import in this project starting with github.com/apache/ [incubator-answer]
Posted by "surapuramakhil (via GitHub)" <gi...@apache.org>.
GitHub user surapuramakhil added a comment to the discussion: Why Every Import in this project starting with github.com/apache/
Ah there won't be any external developers for this. It's end-to-end system (deploy and use)
GitHub link: https://github.com/apache/incubator-answer/discussions/740#discussioncomment-8259926
----
This is an automatically sent email for commits@answer.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@answer.apache.org
Re: [D] Why Every Import in this project starting with github.com/apache/ [incubator-answer]
Posted by "Sirivasv (via GitHub)" <gi...@apache.org>.
GitHub user Sirivasv added a comment to the discussion: Why Every Import in this project starting with github.com/apache/
It is mostly coming from Go configuration, in order to use the module it has to be [initialized](https://go.dev/ref/mod#go-mod-init) via `go mod`.
And here it has a go.mod file where you can see the name that was chosen is `github.com/apache/incubator-answer/`:
https://github.com/apache/incubator-answer/blob/52e0a4c59ba1b44849a373c5f2521968a48d15d0/go.mod#L1
GitHub link: https://github.com/apache/incubator-answer/discussions/740#discussioncomment-8255489
----
This is an automatically sent email for commits@answer.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@answer.apache.org
Re: [D] Why Every Import in this project starting with github.com/apache/ [incubator-answer]
Posted by "Sirivasv (via GitHub)" <gi...@apache.org>.
GitHub user Sirivasv added a comment to the discussion: Why Every Import in this project starting with github.com/apache/
Ah I get what you mean, yes definitely a downside. I think the standard was in order to benefit external users that I can imagine would be many more than internal developers.
GitHub link: https://github.com/apache/incubator-answer/discussions/740#discussioncomment-8256436
----
This is an automatically sent email for commits@answer.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@answer.apache.org