You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hugegraph.apache.org by "1280019840 (via GitHub)" <gi...@apache.org> on 2024/06/06 07:02:48 UTC
[I] Model is an internal package model, how should I create it Create a model when using Vertex Using Vertex [any] as a parameter, call Vertex What about Create. WithVertex [incubator-hugegraph-doc]
1280019840 opened a new issue, #362:
URL: https://github.com/apache/incubator-hugegraph-doc/issues/362
### Problem Type (问题类型)
struct / logic (架构 / 逻辑问题)
### Your Question (问题描述)


--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [I] Model is an internal package model, how should I create it Create a model when using Vertex Using Vertex [any] as a parameter, call Vertex What about Create. WithVertex [incubator-hugegraph-doc]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #362:
URL: https://github.com/apache/incubator-hugegraph-doc/issues/362#issuecomment-2183463769
Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [I] Model is an internal package model, how should I create it Create a model when using Vertex Using Vertex [any] as a parameter, call Vertex What about Create. WithVertex [incubator-hugegraph-doc]
Posted by "1280019840 (via GitHub)" <gi...@apache.org>.
1280019840 commented on issue #362:
URL: https://github.com/apache/incubator-hugegraph-doc/issues/362#issuecomment-2151723458
> It appears there was a misunderstanding regarding the import paths. The correct import path for the HugeGraph client in Go should be:
>
> ```go
> import (
> "github.com/apache/incubator-hugegraph-toolchain/hugegraph-client-go/hugegraph"
> "github.com/apache/incubator-hugegraph-toolchain/hugegraph-client-go/hugegraph/model"
> )
> ```
>
> Ensure your `go.mod` file includes the correct module path:
>
> ```go
> module your-module-name
>
> go 1.16
>
> require (
> github.com/apache/incubator-hugegraph-toolchain/hugegraph-client-go v1.2.0
> )
> ```
>
> Then, run `go get` to fetch the package:
>
> ```shell
> go get github.com/apache/incubator-hugegraph-toolchain/hugegraph-client-go
> ```
>
> Here is an example of how to use the HugeGraph client in your Go code:
>
> ```go
> package main
>
> import (
> "log"
> "github.com/apache/incubator-hugegraph-toolchain/hugegraph-client-go/hugegraph"
> "github.com/apache/incubator-hugegraph-toolchain/hugegraph-client-go/hugegraph/model"
> )
>
> func main() {
> // Create a new vertex
> vertex := model.Vertex{
> // Initialize vertex fields here
> }
>
> // Use the vertex in the client call
> client, err := hugegraph.NewClient("http://your-hugegraph-server", "hugegraph")
> if err != nil {
> log.Fatalf("Failed to create client: %v", err)
> }
> defer client.Close()
>
> client.Vertex.Create.WithVertex(vertex)
> }
> ```
>
> Make sure to replace `"http://your-hugegraph-server"` with the actual URL of your HugeGraph server and initialize the `vertex` fields as required [[1]](https://github.com/apache/incubator-hugegraph-doc/blob/master/static/client-go/index.html)[[2]](https://github.com/apache/incubator-hugegraph-doc/blob/master/content/en/docs/quickstart/hugegraph-client.md)[[3]](https://github.com/apache/incubator-hugegraph-doc/blob/master/content/cn/docs/quickstart/hugegraph-client.md).
>
> _To continue talking to [Dosu](https://dosu.dev), mention @dosu._
"github.com/apache/incubator-hugegraph-toolchain/hugegraph-client-go/hugegraph/model"

No such bag.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [I] Model is an internal package model, how should I create it Create a model when using Vertex Using Vertex [any] as a parameter, call Vertex What about Create. WithVertex [incubator-hugegraph-doc]
Posted by "1280019840 (via GitHub)" <gi...@apache.org>.
1280019840 commented on issue #362:
URL: https://github.com/apache/incubator-hugegraph-doc/issues/362#issuecomment-2151627138
> To resolve the issue where the packages `github.com/apache/hugegraph-client-go/hugegraph` and `github.com/apache/hugegraph-client-go/hugegraph/model` do not exist in your Go project, you should update your import paths to use the correct repository and branch.
>
> The correct import paths should be:
>
> ```go
> import (
> "hugegraph.apache.org/client-go/hugegraph"
> "hugegraph.apache.org/client-go/hugegraph/model"
> )
> ```
>
> Make sure your `go.mod` file includes the correct module path:
>
> ```go
> module your-module-name
>
> go 1.16
>
> require (
> hugegraph.apache.org/client-go v0.0.0-xxxxxx // replace with the correct version
> )
> ```
>
> Then, run `go mod tidy` to update your dependencies.
>
> For more detailed information on how to use the HugeGraph-Client, you can refer to the [HugeGraph-Client Quick Start Guide](https://github.com/apache/incubator-hugegraph-toolchain/blob/master/hugegraph-client-go/README.md) [[1]](https://github.com/apache/incubator-hugegraph-doc/blob/master/static/client-go/index.html)[[2]](https://github.com/apache/incubator-hugegraph-doc/blob/master/content/en/docs/quickstart/hugegraph-client.md)[[3]](https://github.com/apache/incubator-hugegraph-doc/blob/master/content/cn/docs/quickstart/hugegraph-client.md).
>
> _To continue talking to [Dosu](https://dosu.dev), mention @dosu._
"hugegraph.apache.org/client-go/hugegraph"
"hugegraph.apache.org/client-go/hugegraph/model"

Packet does not exist
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [I] Model is an internal package model, how should I create it Create a model when using Vertex Using Vertex [any] as a parameter, call Vertex What about Create. WithVertex [incubator-hugegraph-doc]
Posted by "1280019840 (via GitHub)" <gi...@apache.org>.
1280019840 commented on issue #362:
URL: https://github.com/apache/incubator-hugegraph-doc/issues/362#issuecomment-2151600986
> Hello @1280019840! I'm here to assist you with any bugs, questions, or contributions. Let's work together to resolve the issue you've encountered.
>
> To properly declare or import the `model` package in your Go project so that you can create a `vertex` using `model.Vertex` and use it in the `client.Vertex.Create.WithVertex(vertex)` call, you need to import the `hugegraph-client-go` package. Here is how you can do it:
>
> ```go
> import (
> "github.com/apache/hugegraph-client-go/hugegraph"
> "github.com/apache/hugegraph-client-go/hugegraph/model"
> )
>
> // Example usage
> func main() {
> // Create a new vertex
> vertex := model.Vertex{
> // Initialize vertex fields here
> }
>
> // Use the vertex in the client call
> client, err := hugegraph.NewClient("http://your-hugegraph-server", "hugegraph")
> if err != nil {
> log.Fatalf("Failed to create client: %v", err)
> }
> defer client.Close()
>
> client.Vertex.Create.WithVertex(vertex)
> }
> ```
>
> Make sure you replace `"http://your-hugegraph-server"` with the actual URL of your HugeGraph server and initialize the `vertex` fields as required [[1]](https://github.com/apache/incubator-hugegraph-doc/blob/master/static/client-go/index.html).
>
> _To continue talking to [Dosu](https://dosu.dev), mention @dosu._
These two bags don't exist
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [I] Model is an internal package model, how should I create it Create a model when using Vertex Using Vertex [any] as a parameter, call Vertex What about Create. WithVertex [incubator-hugegraph-doc]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #362:
URL: https://github.com/apache/incubator-hugegraph-doc/issues/362#issuecomment-2151609826
<!-- Answer -->
To resolve the issue where the packages `github.com/apache/hugegraph-client-go/hugegraph` and `github.com/apache/hugegraph-client-go/hugegraph/model` do not exist in your Go project, you should update your import paths to use the correct repository and branch.
The correct import paths should be:
```go
import (
"hugegraph.apache.org/client-go/hugegraph"
"hugegraph.apache.org/client-go/hugegraph/model"
)
```
Make sure your `go.mod` file includes the correct module path:
```go
module your-module-name
go 1.16
require (
hugegraph.apache.org/client-go v0.0.0-xxxxxx // replace with the correct version
)
```
Then, run `go mod tidy` to update your dependencies.
For more detailed information on how to use the HugeGraph-Client, you can refer to the [HugeGraph-Client Quick Start Guide](https://github.com/apache/incubator-hugegraph-toolchain/blob/master/hugegraph-client-go/README.md) <sup>[[1]](https://github.com/apache/incubator-hugegraph-doc/blob/master/static/client-go/index.html)</sup><sup>[[2]](https://github.com/apache/incubator-hugegraph-doc/blob/master/content/en/docs/quickstart/hugegraph-client.md)</sup><sup>[[3]](https://github.com/apache/incubator-hugegraph-doc/blob/master/content/cn/docs/quickstart/hugegraph-client.md)</sup>.
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [I] Model is an internal package model, how should I create it Create a model when using Vertex Using Vertex [any] as a parameter, call Vertex What about Create. WithVertex [incubator-hugegraph-doc]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #362:
URL: https://github.com/apache/incubator-hugegraph-doc/issues/362#issuecomment-2151741339
<!-- Answer -->
To resolve the issue of importing the HugeGraph client packages in your Go project, you should use the correct import path as specified in the documentation. The import path should be:
```go
import (
"hugegraph.apache.org/client-go/hugegraph"
"hugegraph.apache.org/client-go/hugegraph/model"
)
```
Ensure your `go.mod` file includes the correct module path and version:
```go
module your-module-name
go 1.16
require (
hugegraph.apache.org/client-go v1.2.0
)
```
Then, run `go mod tidy` to update your dependencies.
For more detailed information, you can refer to the [HugeGraph Go Client README](https://github.com/apache/incubator-hugegraph-toolchain/blob/master/hugegraph-client-go/README.md) <sup>[[1]](https://github.com/apache/incubator-hugegraph-doc/blob/master/static/client-go/index.html)</sup><sup>[[2]](https://github.com/apache/incubator-hugegraph-doc/blob/master/content/en/docs/quickstart/hugegraph-client.md)</sup><sup>[[3]](https://github.com/apache/incubator-hugegraph-doc/blob/master/content/cn/docs/quickstart/hugegraph-client.md)</sup>.
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [I] Model is an internal package model, how should I create it Create a model when using Vertex Using Vertex [any] as a parameter, call Vertex What about Create. WithVertex [incubator-hugegraph-doc]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #362: Model is an internal package model, how should I create it Create a model when using Vertex Using Vertex [any] as a parameter, call Vertex What about Create. WithVertex
URL: https://github.com/apache/incubator-hugegraph-doc/issues/362
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [I] Model is an internal package model, how should I create it Create a model when using Vertex Using Vertex [any] as a parameter, call Vertex What about Create. WithVertex [incubator-hugegraph-doc]
Posted by "1280019840 (via GitHub)" <gi...@apache.org>.
1280019840 commented on issue #362:
URL: https://github.com/apache/incubator-hugegraph-doc/issues/362#issuecomment-2151625995
> ```go
> "hugegraph.apache.org/client-go/hugegraph"
> "hugegraph.apache.org/client-go/hugegraph/model"
> ```

Packet does not exist
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [I] Model is an internal package model, how should I create it Create a model when using Vertex Using Vertex [any] as a parameter, call Vertex What about Create. WithVertex [incubator-hugegraph-doc]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #362:
URL: https://github.com/apache/incubator-hugegraph-doc/issues/362#issuecomment-2151554853
<!-- Greeting -->
Hello @1280019840! I'm here to assist you with any bugs, questions, or contributions. Let's work together to resolve the issue you've encountered.
<!-- Answer -->
To properly declare or import the `model` package in your Go project so that you can create a `vertex` using `model.Vertex` and use it in the `client.Vertex.Create.WithVertex(vertex)` call, you need to import the `hugegraph-client-go` package. Here is how you can do it:
```go
import (
"github.com/apache/hugegraph-client-go/hugegraph"
"github.com/apache/hugegraph-client-go/hugegraph/model"
)
// Example usage
func main() {
// Create a new vertex
vertex := model.Vertex{
// Initialize vertex fields here
}
// Use the vertex in the client call
client, err := hugegraph.NewClient("http://your-hugegraph-server", "hugegraph")
if err != nil {
log.Fatalf("Failed to create client: %v", err)
}
defer client.Close()
client.Vertex.Create.WithVertex(vertex)
}
```
Make sure you replace `"http://your-hugegraph-server"` with the actual URL of your HugeGraph server and initialize the `vertex` fields as required <sup>[[1]](https://github.com/apache/incubator-hugegraph-doc/blob/master/static/client-go/index.html)</sup>.
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [I] Model is an internal package model, how should I create it Create a model when using Vertex Using Vertex [any] as a parameter, call Vertex What about Create. WithVertex [incubator-hugegraph-doc]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #362:
URL: https://github.com/apache/incubator-hugegraph-doc/issues/362#issuecomment-2151696398
<!-- Answer -->
It appears there was a misunderstanding regarding the import paths. The correct import path for the HugeGraph client in Go should be:
```go
import (
"github.com/apache/incubator-hugegraph-toolchain/hugegraph-client-go/hugegraph"
"github.com/apache/incubator-hugegraph-toolchain/hugegraph-client-go/hugegraph/model"
)
```
Ensure your `go.mod` file includes the correct module path:
```go
module your-module-name
go 1.16
require (
github.com/apache/incubator-hugegraph-toolchain/hugegraph-client-go v1.2.0
)
```
Then, run `go get` to fetch the package:
```sh
go get github.com/apache/incubator-hugegraph-toolchain/hugegraph-client-go
```
Here is an example of how to use the HugeGraph client in your Go code:
```go
package main
import (
"log"
"github.com/apache/incubator-hugegraph-toolchain/hugegraph-client-go/hugegraph"
"github.com/apache/incubator-hugegraph-toolchain/hugegraph-client-go/hugegraph/model"
)
func main() {
// Create a new vertex
vertex := model.Vertex{
// Initialize vertex fields here
}
// Use the vertex in the client call
client, err := hugegraph.NewClient("http://your-hugegraph-server", "hugegraph")
if err != nil {
log.Fatalf("Failed to create client: %v", err)
}
defer client.Close()
client.Vertex.Create.WithVertex(vertex)
}
```
Make sure to replace `"http://your-hugegraph-server"` with the actual URL of your HugeGraph server and initialize the `vertex` fields as required <sup>[[1]](https://github.com/apache/incubator-hugegraph-doc/blob/master/static/client-go/index.html)</sup><sup>[[2]](https://github.com/apache/incubator-hugegraph-doc/blob/master/content/en/docs/quickstart/hugegraph-client.md)</sup><sup>[[3]](https://github.com/apache/incubator-hugegraph-doc/blob/master/content/cn/docs/quickstart/hugegraph-client.md)</sup>.
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org
Re: [I] Model is an internal package model, how should I create it Create a model when using Vertex Using Vertex [any] as a parameter, call Vertex What about Create. WithVertex [incubator-hugegraph-doc]
Posted by "1280019840 (via GitHub)" <gi...@apache.org>.
1280019840 commented on issue #362:
URL: https://github.com/apache/incubator-hugegraph-doc/issues/362#issuecomment-2151722495
> ```go
> "github.com/apache/incubator-hugegraph-toolchain/hugegraph-client-go/hugegraph/model"
> ```

No such bag.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org