I am getting errors in packages.Load() when passes a packgae whose
BUILD.bazel file has genrule to autogenerate code in some other location.
The genrule is like:
genrule(
name = "copy_files",
srcs = [
"@someplace//:files",
],
outs = [
"x.json",
"y.json",
It does work (i.e., compiles) if you use a type alias (note the equal sign):
type uintXXX = uint
Whether it is a good idea to allow it to work using two distinct types that
have the same underlying type is debatable. Personally, I think the current
behavior (not allowing the conversion) is pr
On Sun, Jul 16, 2023 at 6:02 PM Leonard Mittmann
wrote:
> Hi everyone, I am wondering if there is efficient way to do the following
> type conversion (without looping over the map):
>
> var m = map[uint]uint{ /*...*/ }
> type uintXXX uint
> // this does not work
> var m2 map[uintXXX]uintXXX = (m
I am trying to build static call graph of go project using cha package.
However when there is a go file which imports "C", the packages.Load(cfg,
args...) function returns error as it is not able to load such packages.
The config struct is:
cfg := &packages.Config{
Mode: packages.LoadSynta
Hi everyone, I am wondering if there is efficient way to do the following
type conversion (without looping over the map):
var m = map[uint]uint{ /*...*/ }
type uintXXX uint
// this does not work
var m2 map[uintXXX]uintXXX = (map[uintXXX]uintXXX)(m)
--
You received this message because you are s