pub fn import<M, N>(module: M, name: N) -> Import
Expand description
The import of a Go type import "foo/bar"
.
ยงExamples
use genco::prelude::*;
let ty = go::import("foo/bar", "Debug");
let toks = quote! {
$ty
};
assert_eq!(
vec![
"import \"foo/bar\"",
"",
"bar.Debug",
],
toks.to_file_vec()?
);