proteus icon indicating copy to clipboard operation
proteus copied to clipboard

type ... will be ignored because it was not present on the scan path.

Open ilejn opened this issue 7 years ago • 0 comments

proteus handles []byte,

>proteus  proto -f /tmp/proteus -p ufdata/tst --verbose
INFO: Generated proto: /tmp/proteus/ufdata/tst/generated.proto

>cat ./main.go 
package main

// Exported smth
//proteus:generate
type Exported struct {
	Field string
	SrcIP []byte `json:"src_ip"`
}

while does not handle net.IP which is effectively the same producing type "IP" of package net will be ignored because it was not present on the scan path.

>proteus  proto -f /tmp/proteus -p ufdata/tst --verbose
WARN: type "IP" of package net will be ignored because it was not present on the scan path.
INFO: Generated proto: /tmp/proteus/ufdata/tst/generated.proto
>cat ./main.go 
package main

import "net"

// Exported smth
//proteus:generate
type Exported struct {
	Field string
	SrcIP net.IP `json:"src_ip"`
}

I can see in strace that proteus reads net/ip.go source file, while it does not help. Is there any way to use such types?

ilejn avatar Jul 13 '18 17:07 ilejn