-
I am trying to import a type from a package. I could not find an example that shows how i can achieve this in the docs. I looked at the docs in Modules, Packages, and Instances but was not able to figure this. Would it make sense to add a simple case ? I am most likely missing something since i am new here so please bear with me // ./main.cue
package main
import (
"example.com/pkg/test"
)
// A spec is of type #Spec
spec: #test.Spec
spec: {
kind: "Homo Sapiens"
} // ./test/test.cue
package test
#Spec: {
kind: string
} // ./cue.mod/module/module.cue
module: "example.com/pkg"
Edit:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
i changed it to |
Beta Was this translation helpful? Give feedback.
-
This discussion has been migrated to cue-lang/cue#1050. For more details about CUE's migration to a new home, please see cue-lang/cue#1078. |
Beta Was this translation helpful? Give feedback.
i changed it to
test.#Spec
instead and it works !