From 93d0b87b98f2c6f67674755e69b6cdfccfba9749 Mon Sep 17 00:00:00 2001 From: Bai Yingjie Date: Wed, 10 Nov 2021 14:45:18 +0000 Subject: [PATCH] update yaegi version --- cmd/extract/extract.go | 6 +- docs/adaptiveservice.md | 2 +- docs/daemon.md | 26 +- .../github_com-godevsig-adaptiveservice.go | 174 ++------ .../github_com-godevsig-grepo-lib-sys-log.go | 12 +- go.mod | 4 +- go.sum | 4 +- gshell_test.go | 5 +- stdlib/compress-flate.go | 17 +- stdlib/compress-zlib.go | 7 +- stdlib/container-heap.go | 27 +- stdlib/context.go | 24 +- stdlib/crypto-cipher.go | 54 +-- stdlib/crypto-elliptic.go | 26 +- stdlib/crypto-tls.go | 6 - stdlib/crypto.go | 27 +- stdlib/database-sql-driver.go | 394 +++++------------- stdlib/database-sql.go | 21 +- stdlib/debug-dwarf.go | 20 +- stdlib/debug-macho.go | 7 +- stdlib/encoding-binary.go | 36 +- stdlib/encoding-gob.go | 14 +- stdlib/encoding-json.go | 14 +- stdlib/encoding-xml.go | 35 +- stdlib/encoding.go | 20 +- stdlib/expvar.go | 6 +- stdlib/flag.go | 33 +- stdlib/fmt.go | 61 +-- stdlib/go-ast.go | 73 +--- stdlib/go-build-constraint.go | 13 +- stdlib/go-constant.go | 20 +- stdlib/go-types.go | 110 ++--- stdlib/hash.go | 95 +---- stdlib/image-color.go | 10 +- stdlib/image-draw.go | 34 +- stdlib/image-jpeg.go | 10 +- stdlib/image-png.go | 10 +- stdlib/image.go | 49 +-- stdlib/io-fs.go | 196 +++------ stdlib/io.go | 165 ++------ stdlib/math-rand.go | 27 +- stdlib/mime-multipart.go | 20 +- stdlib/net-http-cookiejar.go | 13 +- stdlib/net-http-httputil.go | 10 +- stdlib/net-http.go | 99 ++--- stdlib/net-rpc.go | 56 +-- stdlib/net-smtp.go | 6 - stdlib/net.go | 144 ++----- stdlib/os.go | 79 +--- stdlib/reflect.go | 202 +++------ stdlib/runtime.go | 10 +- stdlib/sort.go | 17 +- stdlib/sync.go | 6 - stdlib/testing-quick.go | 7 +- stdlib/testing.go | 67 +-- stdlib/text-template-parse.go | 27 +- 56 files changed, 699 insertions(+), 1958 deletions(-) diff --git a/cmd/extract/extract.go b/cmd/extract/extract.go index 5e1c8d0..37fe146 100644 --- a/cmd/extract/extract.go +++ b/cmd/extract/extract.go @@ -25,7 +25,7 @@ func extractCmd() error { flag.StringVar(&name, "name", "", "the namespace for the extracted symbols") flag.StringVar(&exclude, "exclude", "", "comma separated list of regexp matching symbols to exclude") flag.StringVar(&include, "include", "", "comma separated list of regexp matching symbols to include") - flag.StringVar(&tag, "tag", "", "build tag to be added to the created package") + flag.StringVar(&tag, "tag", "", "comma separated list of build tags to be added to the created package") flag.Parse() @@ -50,7 +50,9 @@ func extractCmd() error { ext := extract.Extractor{ Dest: name, License: license, - Tag: tag, + } + if tag != "" { + ext.Tag = strings.Split(tag, ",") } if exclude != "" { diff --git a/docs/adaptiveservice.md b/docs/adaptiveservice.md index b52e81c..66827b1 100644 --- a/docs/adaptiveservice.md +++ b/docs/adaptiveservice.md @@ -113,7 +113,7 @@ func init() { - `GetObservedIP{}` is a known message to service "IPObserver". - When client calls `conn.SendRecv(as.GetObservedIP{}, &ip)`, the request message is then - delivered to the server's mesage queue waitting one "idle" worker from worker pool to pick + delivered to the server's message queue waitting one "idle" worker from worker pool to pick up the message and call the handler `GetObservedIP.Handle()`. - Many clients can send the request simultaneously and the handlers will be called also in parallel on server side. diff --git a/docs/daemon.md b/docs/daemon.md index 71afa85..1f0c354 100644 --- a/docs/daemon.md +++ b/docs/daemon.md @@ -71,9 +71,9 @@ Usage of daemon [options] url of artifacts to update gshell, require -root ``` -- use `-bcast` if you want to enable gshell discovery in LAN scope -- use `-registry` if you want to enable gshell discovery in WAN scope - NOTE: in WAN scope, a root registry is required to run, see below +- use `-bcast` if you want to enable gshell discovery in LAN scope. +- use `-registry` if you want to enable gshell discovery in WAN scope. + NOTE: in WAN scope, a root registry is required to run, see below. - `-root` makes this gshell daemon root registry, only one "public" system can be root. Public means all the other gshell enabled systems can have IP connectivity to the root. @@ -114,6 +114,22 @@ bin/gshell -wd rootregistry -loglevel info daemon -registry 10.10.10.10:11985 -b ## Example: deploy coordinated daemons +Follow the same steps of the root registry, except `gshell daemon` command: + +```shell +# in gshell work dir +cd /path/to/gshell + +# run gshell daemon +bin/gshell -loglevel info daemon -registry 10.10.10.10:11985 -bcast 9923 & + +# or better to test if gshell deamon is already running +bin/gshell info || bin/gshell -loglevel info daemon -registry 10.10.10.10:11985 -bcast 9923 & +``` + +- registry: specify the root registry IP address +- bcast: LAN broadcast port + ## Auto update gshell binary After started, gshell daemon will always try to update itself automatically, @@ -140,7 +156,7 @@ GSHELL_NOUPDATE=1 bin/gshell -loglevel info -wd .working daemon -registry 10.10. 1. service not found: godevsig_gshellDaemon Start gshell daemon first before any other commands. -1. Start gshell daemon failed with "socket already exists: [/var/tmp/adaptiveservice/builtin_serviceLister.sock]" +1. Start gshell daemon failed with "socket already exists: [/var/tmp/adaptiveservice/builtin_serviceLister.sock]" There is an old gshell daemon still running. `pkill -SIGINT gshell` to kill the old one, and then start the new one. -1. gshell still failed to start? +1. gshell still failed to start? Try `rm -rf /var/tmp/adaptiveservice` and then restart gshell daemon. diff --git a/extension/github_com-godevsig-adaptiveservice.go b/extension/github_com-godevsig-adaptiveservice.go index e89a25b..c162a28 100644 --- a/extension/github_com-godevsig-adaptiveservice.go +++ b/extension/github_com-godevsig-adaptiveservice.go @@ -84,143 +84,89 @@ func init() { type _github_com_godevsig_adaptiveservice_Connection struct { IValue interface{} WClose func() - WGetNetconn func() (r0 adaptiveservice.Netconn) - WNewStream func() (r0 adaptiveservice.Stream) - WRecv func(msgPtr interface{}) (r0 error) - WSend func(msg interface{}) (r0 error) - WSendRecv func(msgSnd interface{}, msgRcvPtr interface{}) (r0 error) + WGetNetconn func() adaptiveservice.Netconn + WNewStream func() adaptiveservice.Stream + WRecv func(msgPtr interface{}) error + WSend func(msg interface{}) error + WSendRecv func(msgSnd interface{}, msgRcvPtr interface{}) error } func (W _github_com_godevsig_adaptiveservice_Connection) Close() { - if W.WClose == nil { - return - } W.WClose() } -func (W _github_com_godevsig_adaptiveservice_Connection) GetNetconn() (r0 adaptiveservice.Netconn) { - if W.WGetNetconn == nil { - return - } +func (W _github_com_godevsig_adaptiveservice_Connection) GetNetconn() adaptiveservice.Netconn { return W.WGetNetconn() } -func (W _github_com_godevsig_adaptiveservice_Connection) NewStream() (r0 adaptiveservice.Stream) { - if W.WNewStream == nil { - return - } +func (W _github_com_godevsig_adaptiveservice_Connection) NewStream() adaptiveservice.Stream { return W.WNewStream() } -func (W _github_com_godevsig_adaptiveservice_Connection) Recv(msgPtr interface{}) (r0 error) { - if W.WRecv == nil { - return - } +func (W _github_com_godevsig_adaptiveservice_Connection) Recv(msgPtr interface{}) error { return W.WRecv(msgPtr) } -func (W _github_com_godevsig_adaptiveservice_Connection) Send(msg interface{}) (r0 error) { - if W.WSend == nil { - return - } +func (W _github_com_godevsig_adaptiveservice_Connection) Send(msg interface{}) error { return W.WSend(msg) } -func (W _github_com_godevsig_adaptiveservice_Connection) SendRecv(msgSnd interface{}, msgRcvPtr interface{}) (r0 error) { - if W.WSendRecv == nil { - return - } +func (W _github_com_godevsig_adaptiveservice_Connection) SendRecv(msgSnd interface{}, msgRcvPtr interface{}) error { return W.WSendRecv(msgSnd, msgRcvPtr) } // _github_com_godevsig_adaptiveservice_Context is an interface wrapper for Context type type _github_com_godevsig_adaptiveservice_Context struct { IValue interface{} - WGetContext func() (r0 interface{}) + WGetContext func() interface{} WGetVar func(v interface{}) WPutVar func(v interface{}) WSetContext func(v interface{}) } -func (W _github_com_godevsig_adaptiveservice_Context) GetContext() (r0 interface{}) { - if W.WGetContext == nil { - return - } +func (W _github_com_godevsig_adaptiveservice_Context) GetContext() interface{} { return W.WGetContext() } func (W _github_com_godevsig_adaptiveservice_Context) GetVar(v interface{}) { - if W.WGetVar == nil { - return - } W.WGetVar(v) } func (W _github_com_godevsig_adaptiveservice_Context) PutVar(v interface{}) { - if W.WPutVar == nil { - return - } W.WPutVar(v) } func (W _github_com_godevsig_adaptiveservice_Context) SetContext(v interface{}) { - if W.WSetContext == nil { - return - } W.WSetContext(v) } // _github_com_godevsig_adaptiveservice_ContextStream is an interface wrapper for ContextStream type type _github_com_godevsig_adaptiveservice_ContextStream struct { IValue interface{} - WGetContext func() (r0 interface{}) - WGetNetconn func() (r0 adaptiveservice.Netconn) + WGetContext func() interface{} + WGetNetconn func() adaptiveservice.Netconn WGetVar func(v interface{}) WPutVar func(v interface{}) - WRecv func(msgPtr interface{}) (r0 error) - WSend func(msg interface{}) (r0 error) - WSendRecv func(msgSnd interface{}, msgRcvPtr interface{}) (r0 error) + WRecv func(msgPtr interface{}) error + WSend func(msg interface{}) error + WSendRecv func(msgSnd interface{}, msgRcvPtr interface{}) error WSetContext func(v interface{}) } -func (W _github_com_godevsig_adaptiveservice_ContextStream) GetContext() (r0 interface{}) { - if W.WGetContext == nil { - return - } +func (W _github_com_godevsig_adaptiveservice_ContextStream) GetContext() interface{} { return W.WGetContext() } -func (W _github_com_godevsig_adaptiveservice_ContextStream) GetNetconn() (r0 adaptiveservice.Netconn) { - if W.WGetNetconn == nil { - return - } +func (W _github_com_godevsig_adaptiveservice_ContextStream) GetNetconn() adaptiveservice.Netconn { return W.WGetNetconn() } func (W _github_com_godevsig_adaptiveservice_ContextStream) GetVar(v interface{}) { - if W.WGetVar == nil { - return - } W.WGetVar(v) } func (W _github_com_godevsig_adaptiveservice_ContextStream) PutVar(v interface{}) { - if W.WPutVar == nil { - return - } W.WPutVar(v) } -func (W _github_com_godevsig_adaptiveservice_ContextStream) Recv(msgPtr interface{}) (r0 error) { - if W.WRecv == nil { - return - } +func (W _github_com_godevsig_adaptiveservice_ContextStream) Recv(msgPtr interface{}) error { return W.WRecv(msgPtr) } -func (W _github_com_godevsig_adaptiveservice_ContextStream) Send(msg interface{}) (r0 error) { - if W.WSend == nil { - return - } +func (W _github_com_godevsig_adaptiveservice_ContextStream) Send(msg interface{}) error { return W.WSend(msg) } -func (W _github_com_godevsig_adaptiveservice_ContextStream) SendRecv(msgSnd interface{}, msgRcvPtr interface{}) (r0 error) { - if W.WSendRecv == nil { - return - } +func (W _github_com_godevsig_adaptiveservice_ContextStream) SendRecv(msgSnd interface{}, msgRcvPtr interface{}) error { return W.WSendRecv(msgSnd, msgRcvPtr) } func (W _github_com_godevsig_adaptiveservice_ContextStream) SetContext(v interface{}) { - if W.WSetContext == nil { - return - } W.WSetContext(v) } @@ -232,15 +178,9 @@ type _github_com_godevsig_adaptiveservice_HighPriorityMessage struct { } func (W _github_com_godevsig_adaptiveservice_HighPriorityMessage) Handle(stream adaptiveservice.ContextStream) (reply interface{}) { - if W.WHandle == nil { - return - } return W.WHandle(stream) } func (W _github_com_godevsig_adaptiveservice_HighPriorityMessage) IsHighPriority() { - if W.WIsHighPriority == nil { - return - } W.WIsHighPriority() } @@ -251,9 +191,6 @@ type _github_com_godevsig_adaptiveservice_KnownMessage struct { } func (W _github_com_godevsig_adaptiveservice_KnownMessage) Handle(stream adaptiveservice.ContextStream) (reply interface{}) { - if W.WHandle == nil { - return - } return W.WHandle(stream) } @@ -267,27 +204,15 @@ type _github_com_godevsig_adaptiveservice_Logger struct { } func (W _github_com_godevsig_adaptiveservice_Logger) Debugf(format string, args ...interface{}) { - if W.WDebugf == nil { - return - } W.WDebugf(format, args...) } func (W _github_com_godevsig_adaptiveservice_Logger) Errorf(format string, args ...interface{}) { - if W.WErrorf == nil { - return - } W.WErrorf(format, args...) } func (W _github_com_godevsig_adaptiveservice_Logger) Infof(format string, args ...interface{}) { - if W.WInfof == nil { - return - } W.WInfof(format, args...) } func (W _github_com_godevsig_adaptiveservice_Logger) Warnf(format string, args ...interface{}) { - if W.WWarnf == nil { - return - } W.WWarnf(format, args...) } @@ -299,75 +224,48 @@ type _github_com_godevsig_adaptiveservice_LowPriorityMessage struct { } func (W _github_com_godevsig_adaptiveservice_LowPriorityMessage) Handle(stream adaptiveservice.ContextStream) (reply interface{}) { - if W.WHandle == nil { - return - } return W.WHandle(stream) } func (W _github_com_godevsig_adaptiveservice_LowPriorityMessage) IsLowPriority() { - if W.WIsLowPriority == nil { - return - } W.WIsLowPriority() } // _github_com_godevsig_adaptiveservice_Netconn is an interface wrapper for Netconn type type _github_com_godevsig_adaptiveservice_Netconn struct { IValue interface{} - WClose func() (r0 error) - WLocalAddr func() (r0 net.Addr) - WRemoteAddr func() (r0 net.Addr) + WClose func() error + WLocalAddr func() net.Addr + WRemoteAddr func() net.Addr } -func (W _github_com_godevsig_adaptiveservice_Netconn) Close() (r0 error) { - if W.WClose == nil { - return - } +func (W _github_com_godevsig_adaptiveservice_Netconn) Close() error { return W.WClose() } -func (W _github_com_godevsig_adaptiveservice_Netconn) LocalAddr() (r0 net.Addr) { - if W.WLocalAddr == nil { - return - } +func (W _github_com_godevsig_adaptiveservice_Netconn) LocalAddr() net.Addr { return W.WLocalAddr() } -func (W _github_com_godevsig_adaptiveservice_Netconn) RemoteAddr() (r0 net.Addr) { - if W.WRemoteAddr == nil { - return - } +func (W _github_com_godevsig_adaptiveservice_Netconn) RemoteAddr() net.Addr { return W.WRemoteAddr() } // _github_com_godevsig_adaptiveservice_Stream is an interface wrapper for Stream type type _github_com_godevsig_adaptiveservice_Stream struct { IValue interface{} - WGetNetconn func() (r0 adaptiveservice.Netconn) - WRecv func(msgPtr interface{}) (r0 error) - WSend func(msg interface{}) (r0 error) - WSendRecv func(msgSnd interface{}, msgRcvPtr interface{}) (r0 error) + WGetNetconn func() adaptiveservice.Netconn + WRecv func(msgPtr interface{}) error + WSend func(msg interface{}) error + WSendRecv func(msgSnd interface{}, msgRcvPtr interface{}) error } -func (W _github_com_godevsig_adaptiveservice_Stream) GetNetconn() (r0 adaptiveservice.Netconn) { - if W.WGetNetconn == nil { - return - } +func (W _github_com_godevsig_adaptiveservice_Stream) GetNetconn() adaptiveservice.Netconn { return W.WGetNetconn() } -func (W _github_com_godevsig_adaptiveservice_Stream) Recv(msgPtr interface{}) (r0 error) { - if W.WRecv == nil { - return - } +func (W _github_com_godevsig_adaptiveservice_Stream) Recv(msgPtr interface{}) error { return W.WRecv(msgPtr) } -func (W _github_com_godevsig_adaptiveservice_Stream) Send(msg interface{}) (r0 error) { - if W.WSend == nil { - return - } +func (W _github_com_godevsig_adaptiveservice_Stream) Send(msg interface{}) error { return W.WSend(msg) } -func (W _github_com_godevsig_adaptiveservice_Stream) SendRecv(msgSnd interface{}, msgRcvPtr interface{}) (r0 error) { - if W.WSendRecv == nil { - return - } +func (W _github_com_godevsig_adaptiveservice_Stream) SendRecv(msgSnd interface{}, msgRcvPtr interface{}) error { return W.WSendRecv(msgSnd, msgRcvPtr) } diff --git a/extension/github_com-godevsig-grepo-lib-sys-log.go b/extension/github_com-godevsig-grepo-lib-sys-log.go index 9100409..088518d 100644 --- a/extension/github_com-godevsig-grepo-lib-sys-log.go +++ b/extension/github_com-godevsig-grepo-lib-sys-log.go @@ -21,10 +21,12 @@ func init() { "Lfatal": reflect.ValueOf(log.Lfatal), "Lfileline": reflect.ValueOf(log.Lfileline), "Linfo": reflect.ValueOf(log.Linfo), + "Linvalid": reflect.ValueOf(log.Linvalid), "Ltrace": reflect.ValueOf(log.Ltrace), "Lwarn": reflect.ValueOf(log.Lwarn), "NewStream": reflect.ValueOf(log.NewStream), "RegOutputterFactory": reflect.ValueOf(log.RegOutputterFactory), + "StringToLoglevel": reflect.ValueOf(log.StringToLoglevel), // type definitions "Flag": reflect.ValueOf((*log.Flag)(nil)), @@ -47,21 +49,15 @@ type _github_com_godevsig_grepo_lib_sys_log_Outputter struct { } func (W _github_com_godevsig_grepo_lib_sys_log_Outputter) Write(p []byte) (n int, err error) { - if W.WWrite == nil { - return - } return W.WWrite(p) } // _github_com_godevsig_grepo_lib_sys_log_OutputterFactory is an interface wrapper for OutputterFactory type type _github_com_godevsig_grepo_lib_sys_log_OutputterFactory struct { IValue interface{} - WNewOutputter func(description string) (r0 log.Outputter, r1 error) + WNewOutputter func(description string) (log.Outputter, error) } -func (W _github_com_godevsig_grepo_lib_sys_log_OutputterFactory) NewOutputter(description string) (r0 log.Outputter, r1 error) { - if W.WNewOutputter == nil { - return - } +func (W _github_com_godevsig_grepo_lib_sys_log_OutputterFactory) NewOutputter(description string) (log.Outputter, error) { return W.WNewOutputter(description) } diff --git a/go.mod b/go.mod index 0f525fb..015b1c4 100644 --- a/go.mod +++ b/go.mod @@ -6,9 +6,7 @@ require ( github.com/godevsig/adaptiveservice v0.9.7 github.com/godevsig/grepo v0.0.3 github.com/mattn/go-runewidth v0.0.13 // indirect - github.com/traefik/yaegi v0.9.23 + github.com/traefik/yaegi v0.11.0 ) -replace github.com/traefik/yaegi => github.com/godevsig/yaegi v0.9.24-0.20210930011514-bda5fa8f8db4 - replace github.com/niubaoshu/gotiny => github.com/godevsig/gotiny v0.0.4-0.20210913173728-083dd4b72177 diff --git a/go.sum b/go.sum index ea8167a..5b0e66d 100644 --- a/go.sum +++ b/go.sum @@ -6,8 +6,6 @@ github.com/godevsig/gotiny v0.0.4-0.20210913173728-083dd4b72177 h1:Ga+4dO0xF4eju github.com/godevsig/gotiny v0.0.4-0.20210913173728-083dd4b72177/go.mod h1:QdEauSzqdF5tbLIVtGYO6sqOhUKVPSZGd5x7xK5oeS4= github.com/godevsig/grepo v0.0.3 h1:9YXYCXTIBQksarJ94nTcb3ZIGikd+EOrW0usQ2H06AE= github.com/godevsig/grepo v0.0.3/go.mod h1:TTod4iAuz7pl2bjVxqA7AECNLYlrYgChOK1IHzJz380= -github.com/godevsig/yaegi v0.9.24-0.20210930011514-bda5fa8f8db4 h1:vr29trcd+DC5F5hlRTBHygISgDL3fP+W5qhDLWUrC1I= -github.com/godevsig/yaegi v0.9.24-0.20210930011514-bda5fa8f8db4/go.mod h1:RuCwD8/wsX7b6KoQHOaIFUfuH3gQIK4KWnFFmJMw5VA= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= @@ -17,3 +15,5 @@ github.com/peterh/liner v1.2.1 h1:O4BlKaq/LWu6VRWmol4ByWfzx6MfXc5Op5HETyIy5yg= github.com/peterh/liner v1.2.1/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/traefik/yaegi v0.11.0 h1:aHHIZDrla3W7PYYsmw5ktf6/D+iP1N/hUQvNN46lmGM= +github.com/traefik/yaegi v0.11.0/go.mod h1:RuCwD8/wsX7b6KoQHOaIFUfuH3gQIK4KWnFFmJMw5VA= diff --git a/gshell_test.go b/gshell_test.go index 4b6cea2..72d1e46 100644 --- a/gshell_test.go +++ b/gshell_test.go @@ -504,10 +504,11 @@ func TestMain(m *testing.M) { fmt.Println(err) os.Exit(1) } - time.Sleep(1 * time.Second) + time.Sleep(time.Second) ret := m.Run() // run tests + time.Sleep(time.Second) exec.Command("pkill", "-SIGINT", "gshell.tester").Run() - time.Sleep(3 * time.Second) + time.Sleep(time.Second) os.Exit(ret) } else { os.Exit(m.Run()) diff --git a/stdlib/compress-flate.go b/stdlib/compress-flate.go index 3a91e6e..1199bf4 100644 --- a/stdlib/compress-flate.go +++ b/stdlib/compress-flate.go @@ -44,31 +44,22 @@ func init() { type _compress_flate_Reader struct { IValue interface{} WRead func(p []byte) (n int, err error) - WReadByte func() (r0 byte, r1 error) + WReadByte func() (byte, error) } func (W _compress_flate_Reader) Read(p []byte) (n int, err error) { - if W.WRead == nil { - return - } return W.WRead(p) } -func (W _compress_flate_Reader) ReadByte() (r0 byte, r1 error) { - if W.WReadByte == nil { - return - } +func (W _compress_flate_Reader) ReadByte() (byte, error) { return W.WReadByte() } // _compress_flate_Resetter is an interface wrapper for Resetter type type _compress_flate_Resetter struct { IValue interface{} - WReset func(r io.Reader, dict []byte) (r0 error) + WReset func(r io.Reader, dict []byte) error } -func (W _compress_flate_Resetter) Reset(r io.Reader, dict []byte) (r0 error) { - if W.WReset == nil { - return - } +func (W _compress_flate_Resetter) Reset(r io.Reader, dict []byte) error { return W.WReset(r, dict) } diff --git a/stdlib/compress-zlib.go b/stdlib/compress-zlib.go index 02407f5..691ad53 100644 --- a/stdlib/compress-zlib.go +++ b/stdlib/compress-zlib.go @@ -41,12 +41,9 @@ func init() { // _compress_zlib_Resetter is an interface wrapper for Resetter type type _compress_zlib_Resetter struct { IValue interface{} - WReset func(r io.Reader, dict []byte) (r0 error) + WReset func(r io.Reader, dict []byte) error } -func (W _compress_zlib_Resetter) Reset(r io.Reader, dict []byte) (r0 error) { - if W.WReset == nil { - return - } +func (W _compress_zlib_Resetter) Reset(r io.Reader, dict []byte) error { return W.WReset(r, dict) } diff --git a/stdlib/container-heap.go b/stdlib/container-heap.go index 333d182..be7ef4d 100644 --- a/stdlib/container-heap.go +++ b/stdlib/container-heap.go @@ -29,40 +29,25 @@ func init() { // _container_heap_Interface is an interface wrapper for Interface type type _container_heap_Interface struct { IValue interface{} - WLen func() (r0 int) - WLess func(i int, j int) (r0 bool) - WPop func() (r0 interface{}) + WLen func() int + WLess func(i int, j int) bool + WPop func() interface{} WPush func(x interface{}) WSwap func(i int, j int) } -func (W _container_heap_Interface) Len() (r0 int) { - if W.WLen == nil { - return - } +func (W _container_heap_Interface) Len() int { return W.WLen() } -func (W _container_heap_Interface) Less(i int, j int) (r0 bool) { - if W.WLess == nil { - return - } +func (W _container_heap_Interface) Less(i int, j int) bool { return W.WLess(i, j) } -func (W _container_heap_Interface) Pop() (r0 interface{}) { - if W.WPop == nil { - return - } +func (W _container_heap_Interface) Pop() interface{} { return W.WPop() } func (W _container_heap_Interface) Push(x interface{}) { - if W.WPush == nil { - return - } W.WPush(x) } func (W _container_heap_Interface) Swap(i int, j int) { - if W.WSwap == nil { - return - } W.WSwap(i, j) } diff --git a/stdlib/context.go b/stdlib/context.go index 3c44f16..9c0e33d 100644 --- a/stdlib/context.go +++ b/stdlib/context.go @@ -35,32 +35,20 @@ func init() { type _context_Context struct { IValue interface{} WDeadline func() (deadline time.Time, ok bool) - WDone func() (r0 <-chan struct{}) - WErr func() (r0 error) - WValue func(key interface{}) (r0 interface{}) + WDone func() <-chan struct{} + WErr func() error + WValue func(key interface{}) interface{} } func (W _context_Context) Deadline() (deadline time.Time, ok bool) { - if W.WDeadline == nil { - return - } return W.WDeadline() } -func (W _context_Context) Done() (r0 <-chan struct{}) { - if W.WDone == nil { - return - } +func (W _context_Context) Done() <-chan struct{} { return W.WDone() } -func (W _context_Context) Err() (r0 error) { - if W.WErr == nil { - return - } +func (W _context_Context) Err() error { return W.WErr() } -func (W _context_Context) Value(key interface{}) (r0 interface{}) { - if W.WValue == nil { - return - } +func (W _context_Context) Value(key interface{}) interface{} { return W.WValue(key) } diff --git a/stdlib/crypto-cipher.go b/stdlib/crypto-cipher.go index 598ac84..4d84cc5 100644 --- a/stdlib/crypto-cipher.go +++ b/stdlib/crypto-cipher.go @@ -41,81 +41,54 @@ func init() { // _crypto_cipher_AEAD is an interface wrapper for AEAD type type _crypto_cipher_AEAD struct { IValue interface{} - WNonceSize func() (r0 int) - WOpen func(dst []byte, nonce []byte, ciphertext []byte, additionalData []byte) (r0 []byte, r1 error) - WOverhead func() (r0 int) - WSeal func(dst []byte, nonce []byte, plaintext []byte, additionalData []byte) (r0 []byte) + WNonceSize func() int + WOpen func(dst []byte, nonce []byte, ciphertext []byte, additionalData []byte) ([]byte, error) + WOverhead func() int + WSeal func(dst []byte, nonce []byte, plaintext []byte, additionalData []byte) []byte } -func (W _crypto_cipher_AEAD) NonceSize() (r0 int) { - if W.WNonceSize == nil { - return - } +func (W _crypto_cipher_AEAD) NonceSize() int { return W.WNonceSize() } -func (W _crypto_cipher_AEAD) Open(dst []byte, nonce []byte, ciphertext []byte, additionalData []byte) (r0 []byte, r1 error) { - if W.WOpen == nil { - return - } +func (W _crypto_cipher_AEAD) Open(dst []byte, nonce []byte, ciphertext []byte, additionalData []byte) ([]byte, error) { return W.WOpen(dst, nonce, ciphertext, additionalData) } -func (W _crypto_cipher_AEAD) Overhead() (r0 int) { - if W.WOverhead == nil { - return - } +func (W _crypto_cipher_AEAD) Overhead() int { return W.WOverhead() } -func (W _crypto_cipher_AEAD) Seal(dst []byte, nonce []byte, plaintext []byte, additionalData []byte) (r0 []byte) { - if W.WSeal == nil { - return - } +func (W _crypto_cipher_AEAD) Seal(dst []byte, nonce []byte, plaintext []byte, additionalData []byte) []byte { return W.WSeal(dst, nonce, plaintext, additionalData) } // _crypto_cipher_Block is an interface wrapper for Block type type _crypto_cipher_Block struct { IValue interface{} - WBlockSize func() (r0 int) + WBlockSize func() int WDecrypt func(dst []byte, src []byte) WEncrypt func(dst []byte, src []byte) } -func (W _crypto_cipher_Block) BlockSize() (r0 int) { - if W.WBlockSize == nil { - return - } +func (W _crypto_cipher_Block) BlockSize() int { return W.WBlockSize() } func (W _crypto_cipher_Block) Decrypt(dst []byte, src []byte) { - if W.WDecrypt == nil { - return - } W.WDecrypt(dst, src) } func (W _crypto_cipher_Block) Encrypt(dst []byte, src []byte) { - if W.WEncrypt == nil { - return - } W.WEncrypt(dst, src) } // _crypto_cipher_BlockMode is an interface wrapper for BlockMode type type _crypto_cipher_BlockMode struct { IValue interface{} - WBlockSize func() (r0 int) + WBlockSize func() int WCryptBlocks func(dst []byte, src []byte) } -func (W _crypto_cipher_BlockMode) BlockSize() (r0 int) { - if W.WBlockSize == nil { - return - } +func (W _crypto_cipher_BlockMode) BlockSize() int { return W.WBlockSize() } func (W _crypto_cipher_BlockMode) CryptBlocks(dst []byte, src []byte) { - if W.WCryptBlocks == nil { - return - } W.WCryptBlocks(dst, src) } @@ -126,8 +99,5 @@ type _crypto_cipher_Stream struct { } func (W _crypto_cipher_Stream) XORKeyStream(dst []byte, src []byte) { - if W.WXORKeyStream == nil { - return - } W.WXORKeyStream(dst, src) } diff --git a/stdlib/crypto-elliptic.go b/stdlib/crypto-elliptic.go index 764e577..0c2ec0c 100644 --- a/stdlib/crypto-elliptic.go +++ b/stdlib/crypto-elliptic.go @@ -37,45 +37,27 @@ type _crypto_elliptic_Curve struct { IValue interface{} WAdd func(x1 *big.Int, y1 *big.Int, x2 *big.Int, y2 *big.Int) (x *big.Int, y *big.Int) WDouble func(x1 *big.Int, y1 *big.Int) (x *big.Int, y *big.Int) - WIsOnCurve func(x *big.Int, y *big.Int) (r0 bool) - WParams func() (r0 *elliptic.CurveParams) + WIsOnCurve func(x *big.Int, y *big.Int) bool + WParams func() *elliptic.CurveParams WScalarBaseMult func(k []byte) (x *big.Int, y *big.Int) WScalarMult func(x1 *big.Int, y1 *big.Int, k []byte) (x *big.Int, y *big.Int) } func (W _crypto_elliptic_Curve) Add(x1 *big.Int, y1 *big.Int, x2 *big.Int, y2 *big.Int) (x *big.Int, y *big.Int) { - if W.WAdd == nil { - return - } return W.WAdd(x1, y1, x2, y2) } func (W _crypto_elliptic_Curve) Double(x1 *big.Int, y1 *big.Int) (x *big.Int, y *big.Int) { - if W.WDouble == nil { - return - } return W.WDouble(x1, y1) } -func (W _crypto_elliptic_Curve) IsOnCurve(x *big.Int, y *big.Int) (r0 bool) { - if W.WIsOnCurve == nil { - return - } +func (W _crypto_elliptic_Curve) IsOnCurve(x *big.Int, y *big.Int) bool { return W.WIsOnCurve(x, y) } -func (W _crypto_elliptic_Curve) Params() (r0 *elliptic.CurveParams) { - if W.WParams == nil { - return - } +func (W _crypto_elliptic_Curve) Params() *elliptic.CurveParams { return W.WParams() } func (W _crypto_elliptic_Curve) ScalarBaseMult(k []byte) (x *big.Int, y *big.Int) { - if W.WScalarBaseMult == nil { - return - } return W.WScalarBaseMult(k) } func (W _crypto_elliptic_Curve) ScalarMult(x1 *big.Int, y1 *big.Int, k []byte) (x *big.Int, y *big.Int) { - if W.WScalarMult == nil { - return - } return W.WScalarMult(x1, y1, k) } diff --git a/stdlib/crypto-tls.go b/stdlib/crypto-tls.go index 8dfd7de..4b7ea7e 100644 --- a/stdlib/crypto-tls.go +++ b/stdlib/crypto-tls.go @@ -114,14 +114,8 @@ type _crypto_tls_ClientSessionCache struct { } func (W _crypto_tls_ClientSessionCache) Get(sessionKey string) (session *tls.ClientSessionState, ok bool) { - if W.WGet == nil { - return - } return W.WGet(sessionKey) } func (W _crypto_tls_ClientSessionCache) Put(sessionKey string, cs *tls.ClientSessionState) { - if W.WPut == nil { - return - } W.WPut(sessionKey, cs) } diff --git a/stdlib/crypto.go b/stdlib/crypto.go index d3c6a01..98ebda4 100644 --- a/stdlib/crypto.go +++ b/stdlib/crypto.go @@ -57,19 +57,13 @@ func init() { type _crypto_Decrypter struct { IValue interface{} WDecrypt func(rand io.Reader, msg []byte, opts crypto.DecrypterOpts) (plaintext []byte, err error) - WPublic func() (r0 crypto.PublicKey) + WPublic func() crypto.PublicKey } func (W _crypto_Decrypter) Decrypt(rand io.Reader, msg []byte, opts crypto.DecrypterOpts) (plaintext []byte, err error) { - if W.WDecrypt == nil { - return - } return W.WDecrypt(rand, msg, opts) } -func (W _crypto_Decrypter) Public() (r0 crypto.PublicKey) { - if W.WPublic == nil { - return - } +func (W _crypto_Decrypter) Public() crypto.PublicKey { return W.WPublic() } @@ -91,32 +85,23 @@ type _crypto_PublicKey struct { // _crypto_Signer is an interface wrapper for Signer type type _crypto_Signer struct { IValue interface{} - WPublic func() (r0 crypto.PublicKey) + WPublic func() crypto.PublicKey WSign func(rand io.Reader, digest []byte, opts crypto.SignerOpts) (signature []byte, err error) } -func (W _crypto_Signer) Public() (r0 crypto.PublicKey) { - if W.WPublic == nil { - return - } +func (W _crypto_Signer) Public() crypto.PublicKey { return W.WPublic() } func (W _crypto_Signer) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) (signature []byte, err error) { - if W.WSign == nil { - return - } return W.WSign(rand, digest, opts) } // _crypto_SignerOpts is an interface wrapper for SignerOpts type type _crypto_SignerOpts struct { IValue interface{} - WHashFunc func() (r0 crypto.Hash) + WHashFunc func() crypto.Hash } -func (W _crypto_SignerOpts) HashFunc() (r0 crypto.Hash) { - if W.WHashFunc == nil { - return - } +func (W _crypto_SignerOpts) HashFunc() crypto.Hash { return W.WHashFunc() } diff --git a/stdlib/database-sql-driver.go b/stdlib/database-sql-driver.go index 1daf59e..b19f21a 100644 --- a/stdlib/database-sql-driver.go +++ b/stdlib/database-sql-driver.go @@ -99,554 +99,386 @@ func init() { // _database_sql_driver_ColumnConverter is an interface wrapper for ColumnConverter type type _database_sql_driver_ColumnConverter struct { IValue interface{} - WColumnConverter func(idx int) (r0 driver.ValueConverter) + WColumnConverter func(idx int) driver.ValueConverter } -func (W _database_sql_driver_ColumnConverter) ColumnConverter(idx int) (r0 driver.ValueConverter) { - if W.WColumnConverter == nil { - return - } +func (W _database_sql_driver_ColumnConverter) ColumnConverter(idx int) driver.ValueConverter { return W.WColumnConverter(idx) } // _database_sql_driver_Conn is an interface wrapper for Conn type type _database_sql_driver_Conn struct { IValue interface{} - WBegin func() (r0 driver.Tx, r1 error) - WClose func() (r0 error) - WPrepare func(query string) (r0 driver.Stmt, r1 error) + WBegin func() (driver.Tx, error) + WClose func() error + WPrepare func(query string) (driver.Stmt, error) } -func (W _database_sql_driver_Conn) Begin() (r0 driver.Tx, r1 error) { - if W.WBegin == nil { - return - } +func (W _database_sql_driver_Conn) Begin() (driver.Tx, error) { return W.WBegin() } -func (W _database_sql_driver_Conn) Close() (r0 error) { - if W.WClose == nil { - return - } +func (W _database_sql_driver_Conn) Close() error { return W.WClose() } -func (W _database_sql_driver_Conn) Prepare(query string) (r0 driver.Stmt, r1 error) { - if W.WPrepare == nil { - return - } +func (W _database_sql_driver_Conn) Prepare(query string) (driver.Stmt, error) { return W.WPrepare(query) } // _database_sql_driver_ConnBeginTx is an interface wrapper for ConnBeginTx type type _database_sql_driver_ConnBeginTx struct { IValue interface{} - WBeginTx func(ctx context.Context, opts driver.TxOptions) (r0 driver.Tx, r1 error) + WBeginTx func(ctx context.Context, opts driver.TxOptions) (driver.Tx, error) } -func (W _database_sql_driver_ConnBeginTx) BeginTx(ctx context.Context, opts driver.TxOptions) (r0 driver.Tx, r1 error) { - if W.WBeginTx == nil { - return - } +func (W _database_sql_driver_ConnBeginTx) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error) { return W.WBeginTx(ctx, opts) } // _database_sql_driver_ConnPrepareContext is an interface wrapper for ConnPrepareContext type type _database_sql_driver_ConnPrepareContext struct { IValue interface{} - WPrepareContext func(ctx context.Context, query string) (r0 driver.Stmt, r1 error) + WPrepareContext func(ctx context.Context, query string) (driver.Stmt, error) } -func (W _database_sql_driver_ConnPrepareContext) PrepareContext(ctx context.Context, query string) (r0 driver.Stmt, r1 error) { - if W.WPrepareContext == nil { - return - } +func (W _database_sql_driver_ConnPrepareContext) PrepareContext(ctx context.Context, query string) (driver.Stmt, error) { return W.WPrepareContext(ctx, query) } // _database_sql_driver_Connector is an interface wrapper for Connector type type _database_sql_driver_Connector struct { IValue interface{} - WConnect func(a0 context.Context) (r0 driver.Conn, r1 error) - WDriver func() (r0 driver.Driver) + WConnect func(a0 context.Context) (driver.Conn, error) + WDriver func() driver.Driver } -func (W _database_sql_driver_Connector) Connect(a0 context.Context) (r0 driver.Conn, r1 error) { - if W.WConnect == nil { - return - } +func (W _database_sql_driver_Connector) Connect(a0 context.Context) (driver.Conn, error) { return W.WConnect(a0) } -func (W _database_sql_driver_Connector) Driver() (r0 driver.Driver) { - if W.WDriver == nil { - return - } +func (W _database_sql_driver_Connector) Driver() driver.Driver { return W.WDriver() } // _database_sql_driver_Driver is an interface wrapper for Driver type type _database_sql_driver_Driver struct { IValue interface{} - WOpen func(name string) (r0 driver.Conn, r1 error) + WOpen func(name string) (driver.Conn, error) } -func (W _database_sql_driver_Driver) Open(name string) (r0 driver.Conn, r1 error) { - if W.WOpen == nil { - return - } +func (W _database_sql_driver_Driver) Open(name string) (driver.Conn, error) { return W.WOpen(name) } // _database_sql_driver_DriverContext is an interface wrapper for DriverContext type type _database_sql_driver_DriverContext struct { IValue interface{} - WOpenConnector func(name string) (r0 driver.Connector, r1 error) + WOpenConnector func(name string) (driver.Connector, error) } -func (W _database_sql_driver_DriverContext) OpenConnector(name string) (r0 driver.Connector, r1 error) { - if W.WOpenConnector == nil { - return - } +func (W _database_sql_driver_DriverContext) OpenConnector(name string) (driver.Connector, error) { return W.WOpenConnector(name) } // _database_sql_driver_Execer is an interface wrapper for Execer type type _database_sql_driver_Execer struct { IValue interface{} - WExec func(query string, args []driver.Value) (r0 driver.Result, r1 error) + WExec func(query string, args []driver.Value) (driver.Result, error) } -func (W _database_sql_driver_Execer) Exec(query string, args []driver.Value) (r0 driver.Result, r1 error) { - if W.WExec == nil { - return - } +func (W _database_sql_driver_Execer) Exec(query string, args []driver.Value) (driver.Result, error) { return W.WExec(query, args) } // _database_sql_driver_ExecerContext is an interface wrapper for ExecerContext type type _database_sql_driver_ExecerContext struct { IValue interface{} - WExecContext func(ctx context.Context, query string, args []driver.NamedValue) (r0 driver.Result, r1 error) + WExecContext func(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error) } -func (W _database_sql_driver_ExecerContext) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (r0 driver.Result, r1 error) { - if W.WExecContext == nil { - return - } +func (W _database_sql_driver_ExecerContext) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error) { return W.WExecContext(ctx, query, args) } // _database_sql_driver_NamedValueChecker is an interface wrapper for NamedValueChecker type type _database_sql_driver_NamedValueChecker struct { IValue interface{} - WCheckNamedValue func(a0 *driver.NamedValue) (r0 error) + WCheckNamedValue func(a0 *driver.NamedValue) error } -func (W _database_sql_driver_NamedValueChecker) CheckNamedValue(a0 *driver.NamedValue) (r0 error) { - if W.WCheckNamedValue == nil { - return - } +func (W _database_sql_driver_NamedValueChecker) CheckNamedValue(a0 *driver.NamedValue) error { return W.WCheckNamedValue(a0) } // _database_sql_driver_Pinger is an interface wrapper for Pinger type type _database_sql_driver_Pinger struct { IValue interface{} - WPing func(ctx context.Context) (r0 error) + WPing func(ctx context.Context) error } -func (W _database_sql_driver_Pinger) Ping(ctx context.Context) (r0 error) { - if W.WPing == nil { - return - } +func (W _database_sql_driver_Pinger) Ping(ctx context.Context) error { return W.WPing(ctx) } // _database_sql_driver_Queryer is an interface wrapper for Queryer type type _database_sql_driver_Queryer struct { IValue interface{} - WQuery func(query string, args []driver.Value) (r0 driver.Rows, r1 error) + WQuery func(query string, args []driver.Value) (driver.Rows, error) } -func (W _database_sql_driver_Queryer) Query(query string, args []driver.Value) (r0 driver.Rows, r1 error) { - if W.WQuery == nil { - return - } +func (W _database_sql_driver_Queryer) Query(query string, args []driver.Value) (driver.Rows, error) { return W.WQuery(query, args) } // _database_sql_driver_QueryerContext is an interface wrapper for QueryerContext type type _database_sql_driver_QueryerContext struct { IValue interface{} - WQueryContext func(ctx context.Context, query string, args []driver.NamedValue) (r0 driver.Rows, r1 error) + WQueryContext func(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error) } -func (W _database_sql_driver_QueryerContext) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (r0 driver.Rows, r1 error) { - if W.WQueryContext == nil { - return - } +func (W _database_sql_driver_QueryerContext) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error) { return W.WQueryContext(ctx, query, args) } // _database_sql_driver_Result is an interface wrapper for Result type type _database_sql_driver_Result struct { IValue interface{} - WLastInsertId func() (r0 int64, r1 error) - WRowsAffected func() (r0 int64, r1 error) + WLastInsertId func() (int64, error) + WRowsAffected func() (int64, error) } -func (W _database_sql_driver_Result) LastInsertId() (r0 int64, r1 error) { - if W.WLastInsertId == nil { - return - } +func (W _database_sql_driver_Result) LastInsertId() (int64, error) { return W.WLastInsertId() } -func (W _database_sql_driver_Result) RowsAffected() (r0 int64, r1 error) { - if W.WRowsAffected == nil { - return - } +func (W _database_sql_driver_Result) RowsAffected() (int64, error) { return W.WRowsAffected() } // _database_sql_driver_Rows is an interface wrapper for Rows type type _database_sql_driver_Rows struct { IValue interface{} - WClose func() (r0 error) - WColumns func() (r0 []string) - WNext func(dest []driver.Value) (r0 error) + WClose func() error + WColumns func() []string + WNext func(dest []driver.Value) error } -func (W _database_sql_driver_Rows) Close() (r0 error) { - if W.WClose == nil { - return - } +func (W _database_sql_driver_Rows) Close() error { return W.WClose() } -func (W _database_sql_driver_Rows) Columns() (r0 []string) { - if W.WColumns == nil { - return - } +func (W _database_sql_driver_Rows) Columns() []string { return W.WColumns() } -func (W _database_sql_driver_Rows) Next(dest []driver.Value) (r0 error) { - if W.WNext == nil { - return - } +func (W _database_sql_driver_Rows) Next(dest []driver.Value) error { return W.WNext(dest) } // _database_sql_driver_RowsColumnTypeDatabaseTypeName is an interface wrapper for RowsColumnTypeDatabaseTypeName type type _database_sql_driver_RowsColumnTypeDatabaseTypeName struct { IValue interface{} - WClose func() (r0 error) - WColumnTypeDatabaseTypeName func(index int) (r0 string) - WColumns func() (r0 []string) - WNext func(dest []driver.Value) (r0 error) + WClose func() error + WColumnTypeDatabaseTypeName func(index int) string + WColumns func() []string + WNext func(dest []driver.Value) error } -func (W _database_sql_driver_RowsColumnTypeDatabaseTypeName) Close() (r0 error) { - if W.WClose == nil { - return - } +func (W _database_sql_driver_RowsColumnTypeDatabaseTypeName) Close() error { return W.WClose() } -func (W _database_sql_driver_RowsColumnTypeDatabaseTypeName) ColumnTypeDatabaseTypeName(index int) (r0 string) { - if W.WColumnTypeDatabaseTypeName == nil { - return - } +func (W _database_sql_driver_RowsColumnTypeDatabaseTypeName) ColumnTypeDatabaseTypeName(index int) string { return W.WColumnTypeDatabaseTypeName(index) } -func (W _database_sql_driver_RowsColumnTypeDatabaseTypeName) Columns() (r0 []string) { - if W.WColumns == nil { - return - } +func (W _database_sql_driver_RowsColumnTypeDatabaseTypeName) Columns() []string { return W.WColumns() } -func (W _database_sql_driver_RowsColumnTypeDatabaseTypeName) Next(dest []driver.Value) (r0 error) { - if W.WNext == nil { - return - } +func (W _database_sql_driver_RowsColumnTypeDatabaseTypeName) Next(dest []driver.Value) error { return W.WNext(dest) } // _database_sql_driver_RowsColumnTypeLength is an interface wrapper for RowsColumnTypeLength type type _database_sql_driver_RowsColumnTypeLength struct { IValue interface{} - WClose func() (r0 error) + WClose func() error WColumnTypeLength func(index int) (length int64, ok bool) - WColumns func() (r0 []string) - WNext func(dest []driver.Value) (r0 error) + WColumns func() []string + WNext func(dest []driver.Value) error } -func (W _database_sql_driver_RowsColumnTypeLength) Close() (r0 error) { - if W.WClose == nil { - return - } +func (W _database_sql_driver_RowsColumnTypeLength) Close() error { return W.WClose() } func (W _database_sql_driver_RowsColumnTypeLength) ColumnTypeLength(index int) (length int64, ok bool) { - if W.WColumnTypeLength == nil { - return - } return W.WColumnTypeLength(index) } -func (W _database_sql_driver_RowsColumnTypeLength) Columns() (r0 []string) { - if W.WColumns == nil { - return - } +func (W _database_sql_driver_RowsColumnTypeLength) Columns() []string { return W.WColumns() } -func (W _database_sql_driver_RowsColumnTypeLength) Next(dest []driver.Value) (r0 error) { - if W.WNext == nil { - return - } +func (W _database_sql_driver_RowsColumnTypeLength) Next(dest []driver.Value) error { return W.WNext(dest) } // _database_sql_driver_RowsColumnTypeNullable is an interface wrapper for RowsColumnTypeNullable type type _database_sql_driver_RowsColumnTypeNullable struct { IValue interface{} - WClose func() (r0 error) + WClose func() error WColumnTypeNullable func(index int) (nullable bool, ok bool) - WColumns func() (r0 []string) - WNext func(dest []driver.Value) (r0 error) + WColumns func() []string + WNext func(dest []driver.Value) error } -func (W _database_sql_driver_RowsColumnTypeNullable) Close() (r0 error) { - if W.WClose == nil { - return - } +func (W _database_sql_driver_RowsColumnTypeNullable) Close() error { return W.WClose() } func (W _database_sql_driver_RowsColumnTypeNullable) ColumnTypeNullable(index int) (nullable bool, ok bool) { - if W.WColumnTypeNullable == nil { - return - } return W.WColumnTypeNullable(index) } -func (W _database_sql_driver_RowsColumnTypeNullable) Columns() (r0 []string) { - if W.WColumns == nil { - return - } +func (W _database_sql_driver_RowsColumnTypeNullable) Columns() []string { return W.WColumns() } -func (W _database_sql_driver_RowsColumnTypeNullable) Next(dest []driver.Value) (r0 error) { - if W.WNext == nil { - return - } +func (W _database_sql_driver_RowsColumnTypeNullable) Next(dest []driver.Value) error { return W.WNext(dest) } // _database_sql_driver_RowsColumnTypePrecisionScale is an interface wrapper for RowsColumnTypePrecisionScale type type _database_sql_driver_RowsColumnTypePrecisionScale struct { IValue interface{} - WClose func() (r0 error) + WClose func() error WColumnTypePrecisionScale func(index int) (precision int64, scale int64, ok bool) - WColumns func() (r0 []string) - WNext func(dest []driver.Value) (r0 error) + WColumns func() []string + WNext func(dest []driver.Value) error } -func (W _database_sql_driver_RowsColumnTypePrecisionScale) Close() (r0 error) { - if W.WClose == nil { - return - } +func (W _database_sql_driver_RowsColumnTypePrecisionScale) Close() error { return W.WClose() } func (W _database_sql_driver_RowsColumnTypePrecisionScale) ColumnTypePrecisionScale(index int) (precision int64, scale int64, ok bool) { - if W.WColumnTypePrecisionScale == nil { - return - } return W.WColumnTypePrecisionScale(index) } -func (W _database_sql_driver_RowsColumnTypePrecisionScale) Columns() (r0 []string) { - if W.WColumns == nil { - return - } +func (W _database_sql_driver_RowsColumnTypePrecisionScale) Columns() []string { return W.WColumns() } -func (W _database_sql_driver_RowsColumnTypePrecisionScale) Next(dest []driver.Value) (r0 error) { - if W.WNext == nil { - return - } +func (W _database_sql_driver_RowsColumnTypePrecisionScale) Next(dest []driver.Value) error { return W.WNext(dest) } // _database_sql_driver_RowsColumnTypeScanType is an interface wrapper for RowsColumnTypeScanType type type _database_sql_driver_RowsColumnTypeScanType struct { IValue interface{} - WClose func() (r0 error) - WColumnTypeScanType func(index int) (r0 reflect.Type) - WColumns func() (r0 []string) - WNext func(dest []driver.Value) (r0 error) + WClose func() error + WColumnTypeScanType func(index int) reflect.Type + WColumns func() []string + WNext func(dest []driver.Value) error } -func (W _database_sql_driver_RowsColumnTypeScanType) Close() (r0 error) { - if W.WClose == nil { - return - } +func (W _database_sql_driver_RowsColumnTypeScanType) Close() error { return W.WClose() } -func (W _database_sql_driver_RowsColumnTypeScanType) ColumnTypeScanType(index int) (r0 reflect.Type) { - if W.WColumnTypeScanType == nil { - return - } +func (W _database_sql_driver_RowsColumnTypeScanType) ColumnTypeScanType(index int) reflect.Type { return W.WColumnTypeScanType(index) } -func (W _database_sql_driver_RowsColumnTypeScanType) Columns() (r0 []string) { - if W.WColumns == nil { - return - } +func (W _database_sql_driver_RowsColumnTypeScanType) Columns() []string { return W.WColumns() } -func (W _database_sql_driver_RowsColumnTypeScanType) Next(dest []driver.Value) (r0 error) { - if W.WNext == nil { - return - } +func (W _database_sql_driver_RowsColumnTypeScanType) Next(dest []driver.Value) error { return W.WNext(dest) } // _database_sql_driver_RowsNextResultSet is an interface wrapper for RowsNextResultSet type type _database_sql_driver_RowsNextResultSet struct { IValue interface{} - WClose func() (r0 error) - WColumns func() (r0 []string) - WHasNextResultSet func() (r0 bool) - WNext func(dest []driver.Value) (r0 error) - WNextResultSet func() (r0 error) + WClose func() error + WColumns func() []string + WHasNextResultSet func() bool + WNext func(dest []driver.Value) error + WNextResultSet func() error } -func (W _database_sql_driver_RowsNextResultSet) Close() (r0 error) { - if W.WClose == nil { - return - } +func (W _database_sql_driver_RowsNextResultSet) Close() error { return W.WClose() } -func (W _database_sql_driver_RowsNextResultSet) Columns() (r0 []string) { - if W.WColumns == nil { - return - } +func (W _database_sql_driver_RowsNextResultSet) Columns() []string { return W.WColumns() } -func (W _database_sql_driver_RowsNextResultSet) HasNextResultSet() (r0 bool) { - if W.WHasNextResultSet == nil { - return - } +func (W _database_sql_driver_RowsNextResultSet) HasNextResultSet() bool { return W.WHasNextResultSet() } -func (W _database_sql_driver_RowsNextResultSet) Next(dest []driver.Value) (r0 error) { - if W.WNext == nil { - return - } +func (W _database_sql_driver_RowsNextResultSet) Next(dest []driver.Value) error { return W.WNext(dest) } -func (W _database_sql_driver_RowsNextResultSet) NextResultSet() (r0 error) { - if W.WNextResultSet == nil { - return - } +func (W _database_sql_driver_RowsNextResultSet) NextResultSet() error { return W.WNextResultSet() } // _database_sql_driver_SessionResetter is an interface wrapper for SessionResetter type type _database_sql_driver_SessionResetter struct { IValue interface{} - WResetSession func(ctx context.Context) (r0 error) + WResetSession func(ctx context.Context) error } -func (W _database_sql_driver_SessionResetter) ResetSession(ctx context.Context) (r0 error) { - if W.WResetSession == nil { - return - } +func (W _database_sql_driver_SessionResetter) ResetSession(ctx context.Context) error { return W.WResetSession(ctx) } // _database_sql_driver_Stmt is an interface wrapper for Stmt type type _database_sql_driver_Stmt struct { IValue interface{} - WClose func() (r0 error) - WExec func(args []driver.Value) (r0 driver.Result, r1 error) - WNumInput func() (r0 int) - WQuery func(args []driver.Value) (r0 driver.Rows, r1 error) + WClose func() error + WExec func(args []driver.Value) (driver.Result, error) + WNumInput func() int + WQuery func(args []driver.Value) (driver.Rows, error) } -func (W _database_sql_driver_Stmt) Close() (r0 error) { - if W.WClose == nil { - return - } +func (W _database_sql_driver_Stmt) Close() error { return W.WClose() } -func (W _database_sql_driver_Stmt) Exec(args []driver.Value) (r0 driver.Result, r1 error) { - if W.WExec == nil { - return - } +func (W _database_sql_driver_Stmt) Exec(args []driver.Value) (driver.Result, error) { return W.WExec(args) } -func (W _database_sql_driver_Stmt) NumInput() (r0 int) { - if W.WNumInput == nil { - return - } +func (W _database_sql_driver_Stmt) NumInput() int { return W.WNumInput() } -func (W _database_sql_driver_Stmt) Query(args []driver.Value) (r0 driver.Rows, r1 error) { - if W.WQuery == nil { - return - } +func (W _database_sql_driver_Stmt) Query(args []driver.Value) (driver.Rows, error) { return W.WQuery(args) } // _database_sql_driver_StmtExecContext is an interface wrapper for StmtExecContext type type _database_sql_driver_StmtExecContext struct { IValue interface{} - WExecContext func(ctx context.Context, args []driver.NamedValue) (r0 driver.Result, r1 error) + WExecContext func(ctx context.Context, args []driver.NamedValue) (driver.Result, error) } -func (W _database_sql_driver_StmtExecContext) ExecContext(ctx context.Context, args []driver.NamedValue) (r0 driver.Result, r1 error) { - if W.WExecContext == nil { - return - } +func (W _database_sql_driver_StmtExecContext) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error) { return W.WExecContext(ctx, args) } // _database_sql_driver_StmtQueryContext is an interface wrapper for StmtQueryContext type type _database_sql_driver_StmtQueryContext struct { IValue interface{} - WQueryContext func(ctx context.Context, args []driver.NamedValue) (r0 driver.Rows, r1 error) + WQueryContext func(ctx context.Context, args []driver.NamedValue) (driver.Rows, error) } -func (W _database_sql_driver_StmtQueryContext) QueryContext(ctx context.Context, args []driver.NamedValue) (r0 driver.Rows, r1 error) { - if W.WQueryContext == nil { - return - } +func (W _database_sql_driver_StmtQueryContext) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error) { return W.WQueryContext(ctx, args) } // _database_sql_driver_Tx is an interface wrapper for Tx type type _database_sql_driver_Tx struct { IValue interface{} - WCommit func() (r0 error) - WRollback func() (r0 error) + WCommit func() error + WRollback func() error } -func (W _database_sql_driver_Tx) Commit() (r0 error) { - if W.WCommit == nil { - return - } +func (W _database_sql_driver_Tx) Commit() error { return W.WCommit() } -func (W _database_sql_driver_Tx) Rollback() (r0 error) { - if W.WRollback == nil { - return - } +func (W _database_sql_driver_Tx) Rollback() error { return W.WRollback() } // _database_sql_driver_Validator is an interface wrapper for Validator type type _database_sql_driver_Validator struct { IValue interface{} - WIsValid func() (r0 bool) + WIsValid func() bool } -func (W _database_sql_driver_Validator) IsValid() (r0 bool) { - if W.WIsValid == nil { - return - } +func (W _database_sql_driver_Validator) IsValid() bool { return W.WIsValid() } @@ -658,25 +490,19 @@ type _database_sql_driver_Value struct { // _database_sql_driver_ValueConverter is an interface wrapper for ValueConverter type type _database_sql_driver_ValueConverter struct { IValue interface{} - WConvertValue func(v interface{}) (r0 driver.Value, r1 error) + WConvertValue func(v interface{}) (driver.Value, error) } -func (W _database_sql_driver_ValueConverter) ConvertValue(v interface{}) (r0 driver.Value, r1 error) { - if W.WConvertValue == nil { - return - } +func (W _database_sql_driver_ValueConverter) ConvertValue(v interface{}) (driver.Value, error) { return W.WConvertValue(v) } // _database_sql_driver_Valuer is an interface wrapper for Valuer type type _database_sql_driver_Valuer struct { IValue interface{} - WValue func() (r0 driver.Value, r1 error) + WValue func() (driver.Value, error) } -func (W _database_sql_driver_Valuer) Value() (r0 driver.Value, r1 error) { - if W.WValue == nil { - return - } +func (W _database_sql_driver_Valuer) Value() (driver.Value, error) { return W.WValue() } diff --git a/stdlib/database-sql.go b/stdlib/database-sql.go index d1f56ab..af24056 100644 --- a/stdlib/database-sql.go +++ b/stdlib/database-sql.go @@ -61,32 +61,23 @@ func init() { // _database_sql_Result is an interface wrapper for Result type type _database_sql_Result struct { IValue interface{} - WLastInsertId func() (r0 int64, r1 error) - WRowsAffected func() (r0 int64, r1 error) + WLastInsertId func() (int64, error) + WRowsAffected func() (int64, error) } -func (W _database_sql_Result) LastInsertId() (r0 int64, r1 error) { - if W.WLastInsertId == nil { - return - } +func (W _database_sql_Result) LastInsertId() (int64, error) { return W.WLastInsertId() } -func (W _database_sql_Result) RowsAffected() (r0 int64, r1 error) { - if W.WRowsAffected == nil { - return - } +func (W _database_sql_Result) RowsAffected() (int64, error) { return W.WRowsAffected() } // _database_sql_Scanner is an interface wrapper for Scanner type type _database_sql_Scanner struct { IValue interface{} - WScan func(src interface{}) (r0 error) + WScan func(src interface{}) error } -func (W _database_sql_Scanner) Scan(src interface{}) (r0 error) { - if W.WScan == nil { - return - } +func (W _database_sql_Scanner) Scan(src interface{}) error { return W.WScan(src) } diff --git a/stdlib/debug-dwarf.go b/stdlib/debug-dwarf.go index 12e3726..89db3f0 100644 --- a/stdlib/debug-dwarf.go +++ b/stdlib/debug-dwarf.go @@ -272,26 +272,20 @@ func init() { // _debug_dwarf_Type is an interface wrapper for Type type type _debug_dwarf_Type struct { IValue interface{} - WCommon func() (r0 *dwarf.CommonType) - WSize func() (r0 int64) - WString func() (r0 string) + WCommon func() *dwarf.CommonType + WSize func() int64 + WString func() string } -func (W _debug_dwarf_Type) Common() (r0 *dwarf.CommonType) { - if W.WCommon == nil { - return - } +func (W _debug_dwarf_Type) Common() *dwarf.CommonType { return W.WCommon() } -func (W _debug_dwarf_Type) Size() (r0 int64) { - if W.WSize == nil { - return - } +func (W _debug_dwarf_Type) Size() int64 { return W.WSize() } -func (W _debug_dwarf_Type) String() (r0 string) { +func (W _debug_dwarf_Type) String() string { if W.WString == nil { - return + return "" } return W.WString() } diff --git a/stdlib/debug-macho.go b/stdlib/debug-macho.go index db8d09c..906e532 100644 --- a/stdlib/debug-macho.go +++ b/stdlib/debug-macho.go @@ -151,12 +151,9 @@ func init() { // _debug_macho_Load is an interface wrapper for Load type type _debug_macho_Load struct { IValue interface{} - WRaw func() (r0 []byte) + WRaw func() []byte } -func (W _debug_macho_Load) Raw() (r0 []byte) { - if W.WRaw == nil { - return - } +func (W _debug_macho_Load) Raw() []byte { return W.WRaw() } diff --git a/stdlib/encoding-binary.go b/stdlib/encoding-binary.go index cb6c776..ea36c19 100644 --- a/stdlib/encoding-binary.go +++ b/stdlib/encoding-binary.go @@ -43,51 +43,33 @@ type _encoding_binary_ByteOrder struct { WPutUint16 func(a0 []byte, a1 uint16) WPutUint32 func(a0 []byte, a1 uint32) WPutUint64 func(a0 []byte, a1 uint64) - WString func() (r0 string) - WUint16 func(a0 []byte) (r0 uint16) - WUint32 func(a0 []byte) (r0 uint32) - WUint64 func(a0 []byte) (r0 uint64) + WString func() string + WUint16 func(a0 []byte) uint16 + WUint32 func(a0 []byte) uint32 + WUint64 func(a0 []byte) uint64 } func (W _encoding_binary_ByteOrder) PutUint16(a0 []byte, a1 uint16) { - if W.WPutUint16 == nil { - return - } W.WPutUint16(a0, a1) } func (W _encoding_binary_ByteOrder) PutUint32(a0 []byte, a1 uint32) { - if W.WPutUint32 == nil { - return - } W.WPutUint32(a0, a1) } func (W _encoding_binary_ByteOrder) PutUint64(a0 []byte, a1 uint64) { - if W.WPutUint64 == nil { - return - } W.WPutUint64(a0, a1) } -func (W _encoding_binary_ByteOrder) String() (r0 string) { +func (W _encoding_binary_ByteOrder) String() string { if W.WString == nil { - return + return "" } return W.WString() } -func (W _encoding_binary_ByteOrder) Uint16(a0 []byte) (r0 uint16) { - if W.WUint16 == nil { - return - } +func (W _encoding_binary_ByteOrder) Uint16(a0 []byte) uint16 { return W.WUint16(a0) } -func (W _encoding_binary_ByteOrder) Uint32(a0 []byte) (r0 uint32) { - if W.WUint32 == nil { - return - } +func (W _encoding_binary_ByteOrder) Uint32(a0 []byte) uint32 { return W.WUint32(a0) } -func (W _encoding_binary_ByteOrder) Uint64(a0 []byte) (r0 uint64) { - if W.WUint64 == nil { - return - } +func (W _encoding_binary_ByteOrder) Uint64(a0 []byte) uint64 { return W.WUint64(a0) } diff --git a/stdlib/encoding-gob.go b/stdlib/encoding-gob.go index 78afb19..dc7baf1 100644 --- a/stdlib/encoding-gob.go +++ b/stdlib/encoding-gob.go @@ -33,25 +33,19 @@ func init() { // _encoding_gob_GobDecoder is an interface wrapper for GobDecoder type type _encoding_gob_GobDecoder struct { IValue interface{} - WGobDecode func(a0 []byte) (r0 error) + WGobDecode func(a0 []byte) error } -func (W _encoding_gob_GobDecoder) GobDecode(a0 []byte) (r0 error) { - if W.WGobDecode == nil { - return - } +func (W _encoding_gob_GobDecoder) GobDecode(a0 []byte) error { return W.WGobDecode(a0) } // _encoding_gob_GobEncoder is an interface wrapper for GobEncoder type type _encoding_gob_GobEncoder struct { IValue interface{} - WGobEncode func() (r0 []byte, r1 error) + WGobEncode func() ([]byte, error) } -func (W _encoding_gob_GobEncoder) GobEncode() (r0 []byte, r1 error) { - if W.WGobEncode == nil { - return - } +func (W _encoding_gob_GobEncoder) GobEncode() ([]byte, error) { return W.WGobEncode() } diff --git a/stdlib/encoding-json.go b/stdlib/encoding-json.go index 7e4d2df..349475d 100644 --- a/stdlib/encoding-json.go +++ b/stdlib/encoding-json.go @@ -50,13 +50,10 @@ func init() { // _encoding_json_Marshaler is an interface wrapper for Marshaler type type _encoding_json_Marshaler struct { IValue interface{} - WMarshalJSON func() (r0 []byte, r1 error) + WMarshalJSON func() ([]byte, error) } -func (W _encoding_json_Marshaler) MarshalJSON() (r0 []byte, r1 error) { - if W.WMarshalJSON == nil { - return - } +func (W _encoding_json_Marshaler) MarshalJSON() ([]byte, error) { return W.WMarshalJSON() } @@ -68,12 +65,9 @@ type _encoding_json_Token struct { // _encoding_json_Unmarshaler is an interface wrapper for Unmarshaler type type _encoding_json_Unmarshaler struct { IValue interface{} - WUnmarshalJSON func(a0 []byte) (r0 error) + WUnmarshalJSON func(a0 []byte) error } -func (W _encoding_json_Unmarshaler) UnmarshalJSON(a0 []byte) (r0 error) { - if W.WUnmarshalJSON == nil { - return - } +func (W _encoding_json_Unmarshaler) UnmarshalJSON(a0 []byte) error { return W.WUnmarshalJSON(a0) } diff --git a/stdlib/encoding-xml.go b/stdlib/encoding-xml.go index 4cd5af8..1ac059f 100644 --- a/stdlib/encoding-xml.go +++ b/stdlib/encoding-xml.go @@ -62,26 +62,20 @@ func init() { // _encoding_xml_Marshaler is an interface wrapper for Marshaler type type _encoding_xml_Marshaler struct { IValue interface{} - WMarshalXML func(e *xml.Encoder, start xml.StartElement) (r0 error) + WMarshalXML func(e *xml.Encoder, start xml.StartElement) error } -func (W _encoding_xml_Marshaler) MarshalXML(e *xml.Encoder, start xml.StartElement) (r0 error) { - if W.WMarshalXML == nil { - return - } +func (W _encoding_xml_Marshaler) MarshalXML(e *xml.Encoder, start xml.StartElement) error { return W.WMarshalXML(e, start) } // _encoding_xml_MarshalerAttr is an interface wrapper for MarshalerAttr type type _encoding_xml_MarshalerAttr struct { IValue interface{} - WMarshalXMLAttr func(name xml.Name) (r0 xml.Attr, r1 error) + WMarshalXMLAttr func(name xml.Name) (xml.Attr, error) } -func (W _encoding_xml_MarshalerAttr) MarshalXMLAttr(name xml.Name) (r0 xml.Attr, r1 error) { - if W.WMarshalXMLAttr == nil { - return - } +func (W _encoding_xml_MarshalerAttr) MarshalXMLAttr(name xml.Name) (xml.Attr, error) { return W.WMarshalXMLAttr(name) } @@ -93,38 +87,29 @@ type _encoding_xml_Token struct { // _encoding_xml_TokenReader is an interface wrapper for TokenReader type type _encoding_xml_TokenReader struct { IValue interface{} - WToken func() (r0 xml.Token, r1 error) + WToken func() (xml.Token, error) } -func (W _encoding_xml_TokenReader) Token() (r0 xml.Token, r1 error) { - if W.WToken == nil { - return - } +func (W _encoding_xml_TokenReader) Token() (xml.Token, error) { return W.WToken() } // _encoding_xml_Unmarshaler is an interface wrapper for Unmarshaler type type _encoding_xml_Unmarshaler struct { IValue interface{} - WUnmarshalXML func(d *xml.Decoder, start xml.StartElement) (r0 error) + WUnmarshalXML func(d *xml.Decoder, start xml.StartElement) error } -func (W _encoding_xml_Unmarshaler) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (r0 error) { - if W.WUnmarshalXML == nil { - return - } +func (W _encoding_xml_Unmarshaler) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { return W.WUnmarshalXML(d, start) } // _encoding_xml_UnmarshalerAttr is an interface wrapper for UnmarshalerAttr type type _encoding_xml_UnmarshalerAttr struct { IValue interface{} - WUnmarshalXMLAttr func(attr xml.Attr) (r0 error) + WUnmarshalXMLAttr func(attr xml.Attr) error } -func (W _encoding_xml_UnmarshalerAttr) UnmarshalXMLAttr(attr xml.Attr) (r0 error) { - if W.WUnmarshalXMLAttr == nil { - return - } +func (W _encoding_xml_UnmarshalerAttr) UnmarshalXMLAttr(attr xml.Attr) error { return W.WUnmarshalXMLAttr(attr) } diff --git a/stdlib/encoding.go b/stdlib/encoding.go index 9fba8a8..7e1caa5 100644 --- a/stdlib/encoding.go +++ b/stdlib/encoding.go @@ -32,22 +32,16 @@ type _encoding_BinaryMarshaler struct { } func (W _encoding_BinaryMarshaler) MarshalBinary() (data []byte, err error) { - if W.WMarshalBinary == nil { - return - } return W.WMarshalBinary() } // _encoding_BinaryUnmarshaler is an interface wrapper for BinaryUnmarshaler type type _encoding_BinaryUnmarshaler struct { IValue interface{} - WUnmarshalBinary func(data []byte) (r0 error) + WUnmarshalBinary func(data []byte) error } -func (W _encoding_BinaryUnmarshaler) UnmarshalBinary(data []byte) (r0 error) { - if W.WUnmarshalBinary == nil { - return - } +func (W _encoding_BinaryUnmarshaler) UnmarshalBinary(data []byte) error { return W.WUnmarshalBinary(data) } @@ -58,21 +52,15 @@ type _encoding_TextMarshaler struct { } func (W _encoding_TextMarshaler) MarshalText() (text []byte, err error) { - if W.WMarshalText == nil { - return - } return W.WMarshalText() } // _encoding_TextUnmarshaler is an interface wrapper for TextUnmarshaler type type _encoding_TextUnmarshaler struct { IValue interface{} - WUnmarshalText func(text []byte) (r0 error) + WUnmarshalText func(text []byte) error } -func (W _encoding_TextUnmarshaler) UnmarshalText(text []byte) (r0 error) { - if W.WUnmarshalText == nil { - return - } +func (W _encoding_TextUnmarshaler) UnmarshalText(text []byte) error { return W.WUnmarshalText(text) } diff --git a/stdlib/expvar.go b/stdlib/expvar.go index cbe275b..074899c 100644 --- a/stdlib/expvar.go +++ b/stdlib/expvar.go @@ -38,12 +38,12 @@ func init() { // _expvar_Var is an interface wrapper for Var type type _expvar_Var struct { IValue interface{} - WString func() (r0 string) + WString func() string } -func (W _expvar_Var) String() (r0 string) { +func (W _expvar_Var) String() string { if W.WString == nil { - return + return "" } return W.WString() } diff --git a/stdlib/flag.go b/stdlib/flag.go index 197a098..fc26d2e 100644 --- a/stdlib/flag.go +++ b/stdlib/flag.go @@ -66,26 +66,20 @@ func init() { // _flag_Getter is an interface wrapper for Getter type type _flag_Getter struct { IValue interface{} - WGet func() (r0 interface{}) - WSet func(a0 string) (r0 error) - WString func() (r0 string) + WGet func() interface{} + WSet func(a0 string) error + WString func() string } -func (W _flag_Getter) Get() (r0 interface{}) { - if W.WGet == nil { - return - } +func (W _flag_Getter) Get() interface{} { return W.WGet() } -func (W _flag_Getter) Set(a0 string) (r0 error) { - if W.WSet == nil { - return - } +func (W _flag_Getter) Set(a0 string) error { return W.WSet(a0) } -func (W _flag_Getter) String() (r0 string) { +func (W _flag_Getter) String() string { if W.WString == nil { - return + return "" } return W.WString() } @@ -93,19 +87,16 @@ func (W _flag_Getter) String() (r0 string) { // _flag_Value is an interface wrapper for Value type type _flag_Value struct { IValue interface{} - WSet func(a0 string) (r0 error) - WString func() (r0 string) + WSet func(a0 string) error + WString func() string } -func (W _flag_Value) Set(a0 string) (r0 error) { - if W.WSet == nil { - return - } +func (W _flag_Value) Set(a0 string) error { return W.WSet(a0) } -func (W _flag_Value) String() (r0 string) { +func (W _flag_Value) String() string { if W.WString == nil { - return + return "" } return W.WString() } diff --git a/stdlib/fmt.go b/stdlib/fmt.go index 2e51165..4963f53 100644 --- a/stdlib/fmt.go +++ b/stdlib/fmt.go @@ -57,22 +57,16 @@ type _fmt_Formatter struct { } func (W _fmt_Formatter) Format(f fmt.State, verb rune) { - if W.WFormat == nil { - return - } W.WFormat(f, verb) } // _fmt_GoStringer is an interface wrapper for GoStringer type type _fmt_GoStringer struct { IValue interface{} - WGoString func() (r0 string) + WGoString func() string } -func (W _fmt_GoStringer) GoString() (r0 string) { - if W.WGoString == nil { - return - } +func (W _fmt_GoStringer) GoString() string { return W.WGoString() } @@ -83,103 +77,70 @@ type _fmt_ScanState struct { WReadRune func() (r rune, size int, err error) WSkipSpace func() WToken func(skipSpace bool, f func(rune) bool) (token []byte, err error) - WUnreadRune func() (r0 error) + WUnreadRune func() error WWidth func() (wid int, ok bool) } func (W _fmt_ScanState) Read(buf []byte) (n int, err error) { - if W.WRead == nil { - return - } return W.WRead(buf) } func (W _fmt_ScanState) ReadRune() (r rune, size int, err error) { - if W.WReadRune == nil { - return - } return W.WReadRune() } func (W _fmt_ScanState) SkipSpace() { - if W.WSkipSpace == nil { - return - } W.WSkipSpace() } func (W _fmt_ScanState) Token(skipSpace bool, f func(rune) bool) (token []byte, err error) { - if W.WToken == nil { - return - } return W.WToken(skipSpace, f) } -func (W _fmt_ScanState) UnreadRune() (r0 error) { - if W.WUnreadRune == nil { - return - } +func (W _fmt_ScanState) UnreadRune() error { return W.WUnreadRune() } func (W _fmt_ScanState) Width() (wid int, ok bool) { - if W.WWidth == nil { - return - } return W.WWidth() } // _fmt_Scanner is an interface wrapper for Scanner type type _fmt_Scanner struct { IValue interface{} - WScan func(state fmt.ScanState, verb rune) (r0 error) + WScan func(state fmt.ScanState, verb rune) error } -func (W _fmt_Scanner) Scan(state fmt.ScanState, verb rune) (r0 error) { - if W.WScan == nil { - return - } +func (W _fmt_Scanner) Scan(state fmt.ScanState, verb rune) error { return W.WScan(state, verb) } // _fmt_State is an interface wrapper for State type type _fmt_State struct { IValue interface{} - WFlag func(c int) (r0 bool) + WFlag func(c int) bool WPrecision func() (prec int, ok bool) WWidth func() (wid int, ok bool) WWrite func(b []byte) (n int, err error) } -func (W _fmt_State) Flag(c int) (r0 bool) { - if W.WFlag == nil { - return - } +func (W _fmt_State) Flag(c int) bool { return W.WFlag(c) } func (W _fmt_State) Precision() (prec int, ok bool) { - if W.WPrecision == nil { - return - } return W.WPrecision() } func (W _fmt_State) Width() (wid int, ok bool) { - if W.WWidth == nil { - return - } return W.WWidth() } func (W _fmt_State) Write(b []byte) (n int, err error) { - if W.WWrite == nil { - return - } return W.WWrite(b) } // _fmt_Stringer is an interface wrapper for Stringer type type _fmt_Stringer struct { IValue interface{} - WString func() (r0 string) + WString func() string } -func (W _fmt_Stringer) String() (r0 string) { +func (W _fmt_Stringer) String() string { if W.WString == nil { - return + return "" } return W.WString() } diff --git a/stdlib/go-ast.go b/stdlib/go-ast.go index 717131d..45b6bf5 100644 --- a/stdlib/go-ast.go +++ b/stdlib/go-ast.go @@ -129,100 +129,70 @@ func init() { // _go_ast_Decl is an interface wrapper for Decl type type _go_ast_Decl struct { IValue interface{} - WEnd func() (r0 token.Pos) - WPos func() (r0 token.Pos) + WEnd func() token.Pos + WPos func() token.Pos } -func (W _go_ast_Decl) End() (r0 token.Pos) { - if W.WEnd == nil { - return - } +func (W _go_ast_Decl) End() token.Pos { return W.WEnd() } -func (W _go_ast_Decl) Pos() (r0 token.Pos) { - if W.WPos == nil { - return - } +func (W _go_ast_Decl) Pos() token.Pos { return W.WPos() } // _go_ast_Expr is an interface wrapper for Expr type type _go_ast_Expr struct { IValue interface{} - WEnd func() (r0 token.Pos) - WPos func() (r0 token.Pos) + WEnd func() token.Pos + WPos func() token.Pos } -func (W _go_ast_Expr) End() (r0 token.Pos) { - if W.WEnd == nil { - return - } +func (W _go_ast_Expr) End() token.Pos { return W.WEnd() } -func (W _go_ast_Expr) Pos() (r0 token.Pos) { - if W.WPos == nil { - return - } +func (W _go_ast_Expr) Pos() token.Pos { return W.WPos() } // _go_ast_Node is an interface wrapper for Node type type _go_ast_Node struct { IValue interface{} - WEnd func() (r0 token.Pos) - WPos func() (r0 token.Pos) + WEnd func() token.Pos + WPos func() token.Pos } -func (W _go_ast_Node) End() (r0 token.Pos) { - if W.WEnd == nil { - return - } +func (W _go_ast_Node) End() token.Pos { return W.WEnd() } -func (W _go_ast_Node) Pos() (r0 token.Pos) { - if W.WPos == nil { - return - } +func (W _go_ast_Node) Pos() token.Pos { return W.WPos() } // _go_ast_Spec is an interface wrapper for Spec type type _go_ast_Spec struct { IValue interface{} - WEnd func() (r0 token.Pos) - WPos func() (r0 token.Pos) + WEnd func() token.Pos + WPos func() token.Pos } -func (W _go_ast_Spec) End() (r0 token.Pos) { - if W.WEnd == nil { - return - } +func (W _go_ast_Spec) End() token.Pos { return W.WEnd() } -func (W _go_ast_Spec) Pos() (r0 token.Pos) { - if W.WPos == nil { - return - } +func (W _go_ast_Spec) Pos() token.Pos { return W.WPos() } // _go_ast_Stmt is an interface wrapper for Stmt type type _go_ast_Stmt struct { IValue interface{} - WEnd func() (r0 token.Pos) - WPos func() (r0 token.Pos) + WEnd func() token.Pos + WPos func() token.Pos } -func (W _go_ast_Stmt) End() (r0 token.Pos) { - if W.WEnd == nil { - return - } +func (W _go_ast_Stmt) End() token.Pos { return W.WEnd() } -func (W _go_ast_Stmt) Pos() (r0 token.Pos) { - if W.WPos == nil { - return - } +func (W _go_ast_Stmt) Pos() token.Pos { return W.WPos() } @@ -233,8 +203,5 @@ type _go_ast_Visitor struct { } func (W _go_ast_Visitor) Visit(node ast.Node) (w ast.Visitor) { - if W.WVisit == nil { - return - } return W.WVisit(node) } diff --git a/stdlib/go-build-constraint.go b/stdlib/go-build-constraint.go index 0defcb0..4cac2e2 100644 --- a/stdlib/go-build-constraint.go +++ b/stdlib/go-build-constraint.go @@ -33,19 +33,16 @@ func init() { // _go_build_constraint_Expr is an interface wrapper for Expr type type _go_build_constraint_Expr struct { IValue interface{} - WEval func(ok func(tag string) bool) (r0 bool) - WString func() (r0 string) + WEval func(ok func(tag string) bool) bool + WString func() string } -func (W _go_build_constraint_Expr) Eval(ok func(tag string) bool) (r0 bool) { - if W.WEval == nil { - return - } +func (W _go_build_constraint_Expr) Eval(ok func(tag string) bool) bool { return W.WEval(ok) } -func (W _go_build_constraint_Expr) String() (r0 string) { +func (W _go_build_constraint_Expr) String() string { if W.WString == nil { - return + return "" } return W.WString() } diff --git a/stdlib/go-constant.go b/stdlib/go-constant.go index eb1ba6d..4426f07 100644 --- a/stdlib/go-constant.go +++ b/stdlib/go-constant.go @@ -62,26 +62,20 @@ func init() { // _go_constant_Value is an interface wrapper for Value type type _go_constant_Value struct { IValue interface{} - WExactString func() (r0 string) - WKind func() (r0 constant.Kind) - WString func() (r0 string) + WExactString func() string + WKind func() constant.Kind + WString func() string } -func (W _go_constant_Value) ExactString() (r0 string) { - if W.WExactString == nil { - return - } +func (W _go_constant_Value) ExactString() string { return W.WExactString() } -func (W _go_constant_Value) Kind() (r0 constant.Kind) { - if W.WKind == nil { - return - } +func (W _go_constant_Value) Kind() constant.Kind { return W.WKind() } -func (W _go_constant_Value) String() (r0 string) { +func (W _go_constant_Value) String() string { if W.WString == nil { - return + return "" } return W.WString() } diff --git a/stdlib/go-types.go b/stdlib/go-types.go index 05a4c62..0fcc953 100644 --- a/stdlib/go-types.go +++ b/stdlib/go-types.go @@ -163,141 +163,99 @@ func init() { // _go_types_Importer is an interface wrapper for Importer type type _go_types_Importer struct { IValue interface{} - WImport func(path string) (r0 *types.Package, r1 error) + WImport func(path string) (*types.Package, error) } -func (W _go_types_Importer) Import(path string) (r0 *types.Package, r1 error) { - if W.WImport == nil { - return - } +func (W _go_types_Importer) Import(path string) (*types.Package, error) { return W.WImport(path) } // _go_types_ImporterFrom is an interface wrapper for ImporterFrom type type _go_types_ImporterFrom struct { IValue interface{} - WImport func(path string) (r0 *types.Package, r1 error) - WImportFrom func(path string, dir string, mode types.ImportMode) (r0 *types.Package, r1 error) + WImport func(path string) (*types.Package, error) + WImportFrom func(path string, dir string, mode types.ImportMode) (*types.Package, error) } -func (W _go_types_ImporterFrom) Import(path string) (r0 *types.Package, r1 error) { - if W.WImport == nil { - return - } +func (W _go_types_ImporterFrom) Import(path string) (*types.Package, error) { return W.WImport(path) } -func (W _go_types_ImporterFrom) ImportFrom(path string, dir string, mode types.ImportMode) (r0 *types.Package, r1 error) { - if W.WImportFrom == nil { - return - } +func (W _go_types_ImporterFrom) ImportFrom(path string, dir string, mode types.ImportMode) (*types.Package, error) { return W.WImportFrom(path, dir, mode) } // _go_types_Object is an interface wrapper for Object type type _go_types_Object struct { IValue interface{} - WExported func() (r0 bool) - WId func() (r0 string) - WName func() (r0 string) - WParent func() (r0 *types.Scope) - WPkg func() (r0 *types.Package) - WPos func() (r0 token.Pos) - WString func() (r0 string) - WType func() (r0 types.Type) + WExported func() bool + WId func() string + WName func() string + WParent func() *types.Scope + WPkg func() *types.Package + WPos func() token.Pos + WString func() string + WType func() types.Type } -func (W _go_types_Object) Exported() (r0 bool) { - if W.WExported == nil { - return - } +func (W _go_types_Object) Exported() bool { return W.WExported() } -func (W _go_types_Object) Id() (r0 string) { - if W.WId == nil { - return - } +func (W _go_types_Object) Id() string { return W.WId() } -func (W _go_types_Object) Name() (r0 string) { - if W.WName == nil { - return - } +func (W _go_types_Object) Name() string { return W.WName() } -func (W _go_types_Object) Parent() (r0 *types.Scope) { - if W.WParent == nil { - return - } +func (W _go_types_Object) Parent() *types.Scope { return W.WParent() } -func (W _go_types_Object) Pkg() (r0 *types.Package) { - if W.WPkg == nil { - return - } +func (W _go_types_Object) Pkg() *types.Package { return W.WPkg() } -func (W _go_types_Object) Pos() (r0 token.Pos) { - if W.WPos == nil { - return - } +func (W _go_types_Object) Pos() token.Pos { return W.WPos() } -func (W _go_types_Object) String() (r0 string) { +func (W _go_types_Object) String() string { if W.WString == nil { - return + return "" } return W.WString() } -func (W _go_types_Object) Type() (r0 types.Type) { - if W.WType == nil { - return - } +func (W _go_types_Object) Type() types.Type { return W.WType() } // _go_types_Sizes is an interface wrapper for Sizes type type _go_types_Sizes struct { IValue interface{} - WAlignof func(T types.Type) (r0 int64) - WOffsetsof func(fields []*types.Var) (r0 []int64) - WSizeof func(T types.Type) (r0 int64) + WAlignof func(T types.Type) int64 + WOffsetsof func(fields []*types.Var) []int64 + WSizeof func(T types.Type) int64 } -func (W _go_types_Sizes) Alignof(T types.Type) (r0 int64) { - if W.WAlignof == nil { - return - } +func (W _go_types_Sizes) Alignof(T types.Type) int64 { return W.WAlignof(T) } -func (W _go_types_Sizes) Offsetsof(fields []*types.Var) (r0 []int64) { - if W.WOffsetsof == nil { - return - } +func (W _go_types_Sizes) Offsetsof(fields []*types.Var) []int64 { return W.WOffsetsof(fields) } -func (W _go_types_Sizes) Sizeof(T types.Type) (r0 int64) { - if W.WSizeof == nil { - return - } +func (W _go_types_Sizes) Sizeof(T types.Type) int64 { return W.WSizeof(T) } // _go_types_Type is an interface wrapper for Type type type _go_types_Type struct { IValue interface{} - WString func() (r0 string) - WUnderlying func() (r0 types.Type) + WString func() string + WUnderlying func() types.Type } -func (W _go_types_Type) String() (r0 string) { +func (W _go_types_Type) String() string { if W.WString == nil { - return + return "" } return W.WString() } -func (W _go_types_Type) Underlying() (r0 types.Type) { - if W.WUnderlying == nil { - return - } +func (W _go_types_Type) Underlying() types.Type { return W.WUnderlying() } diff --git a/stdlib/hash.go b/stdlib/hash.go index 4d766bf..d4a5ef4 100644 --- a/stdlib/hash.go +++ b/stdlib/hash.go @@ -26,136 +26,85 @@ func init() { // _hash_Hash is an interface wrapper for Hash type type _hash_Hash struct { IValue interface{} - WBlockSize func() (r0 int) + WBlockSize func() int WReset func() - WSize func() (r0 int) - WSum func(b []byte) (r0 []byte) + WSize func() int + WSum func(b []byte) []byte WWrite func(p []byte) (n int, err error) } -func (W _hash_Hash) BlockSize() (r0 int) { - if W.WBlockSize == nil { - return - } +func (W _hash_Hash) BlockSize() int { return W.WBlockSize() } func (W _hash_Hash) Reset() { - if W.WReset == nil { - return - } W.WReset() } -func (W _hash_Hash) Size() (r0 int) { - if W.WSize == nil { - return - } +func (W _hash_Hash) Size() int { return W.WSize() } -func (W _hash_Hash) Sum(b []byte) (r0 []byte) { - if W.WSum == nil { - return - } +func (W _hash_Hash) Sum(b []byte) []byte { return W.WSum(b) } func (W _hash_Hash) Write(p []byte) (n int, err error) { - if W.WWrite == nil { - return - } return W.WWrite(p) } // _hash_Hash32 is an interface wrapper for Hash32 type type _hash_Hash32 struct { IValue interface{} - WBlockSize func() (r0 int) + WBlockSize func() int WReset func() - WSize func() (r0 int) - WSum func(b []byte) (r0 []byte) - WSum32 func() (r0 uint32) + WSize func() int + WSum func(b []byte) []byte + WSum32 func() uint32 WWrite func(p []byte) (n int, err error) } -func (W _hash_Hash32) BlockSize() (r0 int) { - if W.WBlockSize == nil { - return - } +func (W _hash_Hash32) BlockSize() int { return W.WBlockSize() } func (W _hash_Hash32) Reset() { - if W.WReset == nil { - return - } W.WReset() } -func (W _hash_Hash32) Size() (r0 int) { - if W.WSize == nil { - return - } +func (W _hash_Hash32) Size() int { return W.WSize() } -func (W _hash_Hash32) Sum(b []byte) (r0 []byte) { - if W.WSum == nil { - return - } +func (W _hash_Hash32) Sum(b []byte) []byte { return W.WSum(b) } -func (W _hash_Hash32) Sum32() (r0 uint32) { - if W.WSum32 == nil { - return - } +func (W _hash_Hash32) Sum32() uint32 { return W.WSum32() } func (W _hash_Hash32) Write(p []byte) (n int, err error) { - if W.WWrite == nil { - return - } return W.WWrite(p) } // _hash_Hash64 is an interface wrapper for Hash64 type type _hash_Hash64 struct { IValue interface{} - WBlockSize func() (r0 int) + WBlockSize func() int WReset func() - WSize func() (r0 int) - WSum func(b []byte) (r0 []byte) - WSum64 func() (r0 uint64) + WSize func() int + WSum func(b []byte) []byte + WSum64 func() uint64 WWrite func(p []byte) (n int, err error) } -func (W _hash_Hash64) BlockSize() (r0 int) { - if W.WBlockSize == nil { - return - } +func (W _hash_Hash64) BlockSize() int { return W.WBlockSize() } func (W _hash_Hash64) Reset() { - if W.WReset == nil { - return - } W.WReset() } -func (W _hash_Hash64) Size() (r0 int) { - if W.WSize == nil { - return - } +func (W _hash_Hash64) Size() int { return W.WSize() } -func (W _hash_Hash64) Sum(b []byte) (r0 []byte) { - if W.WSum == nil { - return - } +func (W _hash_Hash64) Sum(b []byte) []byte { return W.WSum(b) } -func (W _hash_Hash64) Sum64() (r0 uint64) { - if W.WSum64 == nil { - return - } +func (W _hash_Hash64) Sum64() uint64 { return W.WSum64() } func (W _hash_Hash64) Write(p []byte) (n int, err error) { - if W.WWrite == nil { - return - } return W.WWrite(p) } diff --git a/stdlib/image-color.go b/stdlib/image-color.go index f549a33..cb57fe9 100644 --- a/stdlib/image-color.go +++ b/stdlib/image-color.go @@ -62,21 +62,15 @@ type _image_color_Color struct { } func (W _image_color_Color) RGBA() (r uint32, g uint32, b uint32, a uint32) { - if W.WRGBA == nil { - return - } return W.WRGBA() } // _image_color_Model is an interface wrapper for Model type type _image_color_Model struct { IValue interface{} - WConvert func(c color.Color) (r0 color.Color) + WConvert func(c color.Color) color.Color } -func (W _image_color_Model) Convert(c color.Color) (r0 color.Color) { - if W.WConvert == nil { - return - } +func (W _image_color_Model) Convert(c color.Color) color.Color { return W.WConvert(c) } diff --git a/stdlib/image-draw.go b/stdlib/image-draw.go index 8dd42d6..e9b7a72 100644 --- a/stdlib/image-draw.go +++ b/stdlib/image-draw.go @@ -40,55 +40,37 @@ type _image_draw_Drawer struct { } func (W _image_draw_Drawer) Draw(dst draw.Image, r image.Rectangle, src image.Image, sp image.Point) { - if W.WDraw == nil { - return - } W.WDraw(dst, r, src, sp) } // _image_draw_Image is an interface wrapper for Image type type _image_draw_Image struct { IValue interface{} - WAt func(x int, y int) (r0 color.Color) - WBounds func() (r0 image.Rectangle) - WColorModel func() (r0 color.Model) + WAt func(x int, y int) color.Color + WBounds func() image.Rectangle + WColorModel func() color.Model WSet func(x int, y int, c color.Color) } -func (W _image_draw_Image) At(x int, y int) (r0 color.Color) { - if W.WAt == nil { - return - } +func (W _image_draw_Image) At(x int, y int) color.Color { return W.WAt(x, y) } -func (W _image_draw_Image) Bounds() (r0 image.Rectangle) { - if W.WBounds == nil { - return - } +func (W _image_draw_Image) Bounds() image.Rectangle { return W.WBounds() } -func (W _image_draw_Image) ColorModel() (r0 color.Model) { - if W.WColorModel == nil { - return - } +func (W _image_draw_Image) ColorModel() color.Model { return W.WColorModel() } func (W _image_draw_Image) Set(x int, y int, c color.Color) { - if W.WSet == nil { - return - } W.WSet(x, y, c) } // _image_draw_Quantizer is an interface wrapper for Quantizer type type _image_draw_Quantizer struct { IValue interface{} - WQuantize func(p color.Palette, m image.Image) (r0 color.Palette) + WQuantize func(p color.Palette, m image.Image) color.Palette } -func (W _image_draw_Quantizer) Quantize(p color.Palette, m image.Image) (r0 color.Palette) { - if W.WQuantize == nil { - return - } +func (W _image_draw_Quantizer) Quantize(p color.Palette, m image.Image) color.Palette { return W.WQuantize(p, m) } diff --git a/stdlib/image-jpeg.go b/stdlib/image-jpeg.go index 72d95bf..1ed178d 100644 --- a/stdlib/image-jpeg.go +++ b/stdlib/image-jpeg.go @@ -34,18 +34,12 @@ func init() { type _image_jpeg_Reader struct { IValue interface{} WRead func(p []byte) (n int, err error) - WReadByte func() (r0 byte, r1 error) + WReadByte func() (byte, error) } func (W _image_jpeg_Reader) Read(p []byte) (n int, err error) { - if W.WRead == nil { - return - } return W.WRead(p) } -func (W _image_jpeg_Reader) ReadByte() (r0 byte, r1 error) { - if W.WReadByte == nil { - return - } +func (W _image_jpeg_Reader) ReadByte() (byte, error) { return W.WReadByte() } diff --git a/stdlib/image-png.go b/stdlib/image-png.go index 8e2406f..57359a6 100644 --- a/stdlib/image-png.go +++ b/stdlib/image-png.go @@ -36,19 +36,13 @@ func init() { // _image_png_EncoderBufferPool is an interface wrapper for EncoderBufferPool type type _image_png_EncoderBufferPool struct { IValue interface{} - WGet func() (r0 *png.EncoderBuffer) + WGet func() *png.EncoderBuffer WPut func(a0 *png.EncoderBuffer) } -func (W _image_png_EncoderBufferPool) Get() (r0 *png.EncoderBuffer) { - if W.WGet == nil { - return - } +func (W _image_png_EncoderBufferPool) Get() *png.EncoderBuffer { return W.WGet() } func (W _image_png_EncoderBufferPool) Put(a0 *png.EncoderBuffer) { - if W.WPut == nil { - return - } W.WPut(a0) } diff --git a/stdlib/image.go b/stdlib/image.go index 2a909e6..624bfc7 100644 --- a/stdlib/image.go +++ b/stdlib/image.go @@ -75,60 +75,39 @@ func init() { // _image_Image is an interface wrapper for Image type type _image_Image struct { IValue interface{} - WAt func(x int, y int) (r0 color.Color) - WBounds func() (r0 image.Rectangle) - WColorModel func() (r0 color.Model) + WAt func(x int, y int) color.Color + WBounds func() image.Rectangle + WColorModel func() color.Model } -func (W _image_Image) At(x int, y int) (r0 color.Color) { - if W.WAt == nil { - return - } +func (W _image_Image) At(x int, y int) color.Color { return W.WAt(x, y) } -func (W _image_Image) Bounds() (r0 image.Rectangle) { - if W.WBounds == nil { - return - } +func (W _image_Image) Bounds() image.Rectangle { return W.WBounds() } -func (W _image_Image) ColorModel() (r0 color.Model) { - if W.WColorModel == nil { - return - } +func (W _image_Image) ColorModel() color.Model { return W.WColorModel() } // _image_PalettedImage is an interface wrapper for PalettedImage type type _image_PalettedImage struct { IValue interface{} - WAt func(x int, y int) (r0 color.Color) - WBounds func() (r0 image.Rectangle) - WColorIndexAt func(x int, y int) (r0 uint8) - WColorModel func() (r0 color.Model) + WAt func(x int, y int) color.Color + WBounds func() image.Rectangle + WColorIndexAt func(x int, y int) uint8 + WColorModel func() color.Model } -func (W _image_PalettedImage) At(x int, y int) (r0 color.Color) { - if W.WAt == nil { - return - } +func (W _image_PalettedImage) At(x int, y int) color.Color { return W.WAt(x, y) } -func (W _image_PalettedImage) Bounds() (r0 image.Rectangle) { - if W.WBounds == nil { - return - } +func (W _image_PalettedImage) Bounds() image.Rectangle { return W.WBounds() } -func (W _image_PalettedImage) ColorIndexAt(x int, y int) (r0 uint8) { - if W.WColorIndexAt == nil { - return - } +func (W _image_PalettedImage) ColorIndexAt(x int, y int) uint8 { return W.WColorIndexAt(x, y) } -func (W _image_PalettedImage) ColorModel() (r0 color.Model) { - if W.WColorModel == nil { - return - } +func (W _image_PalettedImage) ColorModel() color.Model { return W.WColorModel() } diff --git a/stdlib/io-fs.go b/stdlib/io-fs.go index 65bb172..2a3b553 100644 --- a/stdlib/io-fs.go +++ b/stdlib/io-fs.go @@ -74,255 +74,171 @@ func init() { // _io_fs_DirEntry is an interface wrapper for DirEntry type type _io_fs_DirEntry struct { IValue interface{} - WInfo func() (r0 fs.FileInfo, r1 error) - WIsDir func() (r0 bool) - WName func() (r0 string) - WType func() (r0 fs.FileMode) + WInfo func() (fs.FileInfo, error) + WIsDir func() bool + WName func() string + WType func() fs.FileMode } -func (W _io_fs_DirEntry) Info() (r0 fs.FileInfo, r1 error) { - if W.WInfo == nil { - return - } +func (W _io_fs_DirEntry) Info() (fs.FileInfo, error) { return W.WInfo() } -func (W _io_fs_DirEntry) IsDir() (r0 bool) { - if W.WIsDir == nil { - return - } +func (W _io_fs_DirEntry) IsDir() bool { return W.WIsDir() } -func (W _io_fs_DirEntry) Name() (r0 string) { - if W.WName == nil { - return - } +func (W _io_fs_DirEntry) Name() string { return W.WName() } -func (W _io_fs_DirEntry) Type() (r0 fs.FileMode) { - if W.WType == nil { - return - } +func (W _io_fs_DirEntry) Type() fs.FileMode { return W.WType() } // _io_fs_FS is an interface wrapper for FS type type _io_fs_FS struct { IValue interface{} - WOpen func(name string) (r0 fs.File, r1 error) + WOpen func(name string) (fs.File, error) } -func (W _io_fs_FS) Open(name string) (r0 fs.File, r1 error) { - if W.WOpen == nil { - return - } +func (W _io_fs_FS) Open(name string) (fs.File, error) { return W.WOpen(name) } // _io_fs_File is an interface wrapper for File type type _io_fs_File struct { IValue interface{} - WClose func() (r0 error) - WRead func(a0 []byte) (r0 int, r1 error) - WStat func() (r0 fs.FileInfo, r1 error) + WClose func() error + WRead func(a0 []byte) (int, error) + WStat func() (fs.FileInfo, error) } -func (W _io_fs_File) Close() (r0 error) { - if W.WClose == nil { - return - } +func (W _io_fs_File) Close() error { return W.WClose() } -func (W _io_fs_File) Read(a0 []byte) (r0 int, r1 error) { - if W.WRead == nil { - return - } +func (W _io_fs_File) Read(a0 []byte) (int, error) { return W.WRead(a0) } -func (W _io_fs_File) Stat() (r0 fs.FileInfo, r1 error) { - if W.WStat == nil { - return - } +func (W _io_fs_File) Stat() (fs.FileInfo, error) { return W.WStat() } // _io_fs_FileInfo is an interface wrapper for FileInfo type type _io_fs_FileInfo struct { IValue interface{} - WIsDir func() (r0 bool) - WModTime func() (r0 time.Time) - WMode func() (r0 fs.FileMode) - WName func() (r0 string) - WSize func() (r0 int64) - WSys func() (r0 interface{}) + WIsDir func() bool + WModTime func() time.Time + WMode func() fs.FileMode + WName func() string + WSize func() int64 + WSys func() interface{} } -func (W _io_fs_FileInfo) IsDir() (r0 bool) { - if W.WIsDir == nil { - return - } +func (W _io_fs_FileInfo) IsDir() bool { return W.WIsDir() } -func (W _io_fs_FileInfo) ModTime() (r0 time.Time) { - if W.WModTime == nil { - return - } +func (W _io_fs_FileInfo) ModTime() time.Time { return W.WModTime() } -func (W _io_fs_FileInfo) Mode() (r0 fs.FileMode) { - if W.WMode == nil { - return - } +func (W _io_fs_FileInfo) Mode() fs.FileMode { return W.WMode() } -func (W _io_fs_FileInfo) Name() (r0 string) { - if W.WName == nil { - return - } +func (W _io_fs_FileInfo) Name() string { return W.WName() } -func (W _io_fs_FileInfo) Size() (r0 int64) { - if W.WSize == nil { - return - } +func (W _io_fs_FileInfo) Size() int64 { return W.WSize() } -func (W _io_fs_FileInfo) Sys() (r0 interface{}) { - if W.WSys == nil { - return - } +func (W _io_fs_FileInfo) Sys() interface{} { return W.WSys() } // _io_fs_GlobFS is an interface wrapper for GlobFS type type _io_fs_GlobFS struct { IValue interface{} - WGlob func(pattern string) (r0 []string, r1 error) - WOpen func(name string) (r0 fs.File, r1 error) + WGlob func(pattern string) ([]string, error) + WOpen func(name string) (fs.File, error) } -func (W _io_fs_GlobFS) Glob(pattern string) (r0 []string, r1 error) { - if W.WGlob == nil { - return - } +func (W _io_fs_GlobFS) Glob(pattern string) ([]string, error) { return W.WGlob(pattern) } -func (W _io_fs_GlobFS) Open(name string) (r0 fs.File, r1 error) { - if W.WOpen == nil { - return - } +func (W _io_fs_GlobFS) Open(name string) (fs.File, error) { return W.WOpen(name) } // _io_fs_ReadDirFS is an interface wrapper for ReadDirFS type type _io_fs_ReadDirFS struct { IValue interface{} - WOpen func(name string) (r0 fs.File, r1 error) - WReadDir func(name string) (r0 []fs.DirEntry, r1 error) + WOpen func(name string) (fs.File, error) + WReadDir func(name string) ([]fs.DirEntry, error) } -func (W _io_fs_ReadDirFS) Open(name string) (r0 fs.File, r1 error) { - if W.WOpen == nil { - return - } +func (W _io_fs_ReadDirFS) Open(name string) (fs.File, error) { return W.WOpen(name) } -func (W _io_fs_ReadDirFS) ReadDir(name string) (r0 []fs.DirEntry, r1 error) { - if W.WReadDir == nil { - return - } +func (W _io_fs_ReadDirFS) ReadDir(name string) ([]fs.DirEntry, error) { return W.WReadDir(name) } // _io_fs_ReadDirFile is an interface wrapper for ReadDirFile type type _io_fs_ReadDirFile struct { IValue interface{} - WClose func() (r0 error) - WRead func(a0 []byte) (r0 int, r1 error) - WReadDir func(n int) (r0 []fs.DirEntry, r1 error) - WStat func() (r0 fs.FileInfo, r1 error) + WClose func() error + WRead func(a0 []byte) (int, error) + WReadDir func(n int) ([]fs.DirEntry, error) + WStat func() (fs.FileInfo, error) } -func (W _io_fs_ReadDirFile) Close() (r0 error) { - if W.WClose == nil { - return - } +func (W _io_fs_ReadDirFile) Close() error { return W.WClose() } -func (W _io_fs_ReadDirFile) Read(a0 []byte) (r0 int, r1 error) { - if W.WRead == nil { - return - } +func (W _io_fs_ReadDirFile) Read(a0 []byte) (int, error) { return W.WRead(a0) } -func (W _io_fs_ReadDirFile) ReadDir(n int) (r0 []fs.DirEntry, r1 error) { - if W.WReadDir == nil { - return - } +func (W _io_fs_ReadDirFile) ReadDir(n int) ([]fs.DirEntry, error) { return W.WReadDir(n) } -func (W _io_fs_ReadDirFile) Stat() (r0 fs.FileInfo, r1 error) { - if W.WStat == nil { - return - } +func (W _io_fs_ReadDirFile) Stat() (fs.FileInfo, error) { return W.WStat() } // _io_fs_ReadFileFS is an interface wrapper for ReadFileFS type type _io_fs_ReadFileFS struct { IValue interface{} - WOpen func(name string) (r0 fs.File, r1 error) - WReadFile func(name string) (r0 []byte, r1 error) + WOpen func(name string) (fs.File, error) + WReadFile func(name string) ([]byte, error) } -func (W _io_fs_ReadFileFS) Open(name string) (r0 fs.File, r1 error) { - if W.WOpen == nil { - return - } +func (W _io_fs_ReadFileFS) Open(name string) (fs.File, error) { return W.WOpen(name) } -func (W _io_fs_ReadFileFS) ReadFile(name string) (r0 []byte, r1 error) { - if W.WReadFile == nil { - return - } +func (W _io_fs_ReadFileFS) ReadFile(name string) ([]byte, error) { return W.WReadFile(name) } // _io_fs_StatFS is an interface wrapper for StatFS type type _io_fs_StatFS struct { IValue interface{} - WOpen func(name string) (r0 fs.File, r1 error) - WStat func(name string) (r0 fs.FileInfo, r1 error) + WOpen func(name string) (fs.File, error) + WStat func(name string) (fs.FileInfo, error) } -func (W _io_fs_StatFS) Open(name string) (r0 fs.File, r1 error) { - if W.WOpen == nil { - return - } +func (W _io_fs_StatFS) Open(name string) (fs.File, error) { return W.WOpen(name) } -func (W _io_fs_StatFS) Stat(name string) (r0 fs.FileInfo, r1 error) { - if W.WStat == nil { - return - } +func (W _io_fs_StatFS) Stat(name string) (fs.FileInfo, error) { return W.WStat(name) } // _io_fs_SubFS is an interface wrapper for SubFS type type _io_fs_SubFS struct { IValue interface{} - WOpen func(name string) (r0 fs.File, r1 error) - WSub func(dir string) (r0 fs.FS, r1 error) + WOpen func(name string) (fs.File, error) + WSub func(dir string) (fs.FS, error) } -func (W _io_fs_SubFS) Open(name string) (r0 fs.File, r1 error) { - if W.WOpen == nil { - return - } +func (W _io_fs_SubFS) Open(name string) (fs.File, error) { return W.WOpen(name) } -func (W _io_fs_SubFS) Sub(dir string) (r0 fs.FS, r1 error) { - if W.WSub == nil { - return - } +func (W _io_fs_SubFS) Sub(dir string) (fs.FS, error) { return W.WSub(dir) } diff --git a/stdlib/io.go b/stdlib/io.go index 60243b0..a90ad34 100644 --- a/stdlib/io.go +++ b/stdlib/io.go @@ -96,106 +96,76 @@ func init() { // _io_ByteReader is an interface wrapper for ByteReader type type _io_ByteReader struct { IValue interface{} - WReadByte func() (r0 byte, r1 error) + WReadByte func() (byte, error) } -func (W _io_ByteReader) ReadByte() (r0 byte, r1 error) { - if W.WReadByte == nil { - return - } +func (W _io_ByteReader) ReadByte() (byte, error) { return W.WReadByte() } // _io_ByteScanner is an interface wrapper for ByteScanner type type _io_ByteScanner struct { IValue interface{} - WReadByte func() (r0 byte, r1 error) - WUnreadByte func() (r0 error) + WReadByte func() (byte, error) + WUnreadByte func() error } -func (W _io_ByteScanner) ReadByte() (r0 byte, r1 error) { - if W.WReadByte == nil { - return - } +func (W _io_ByteScanner) ReadByte() (byte, error) { return W.WReadByte() } -func (W _io_ByteScanner) UnreadByte() (r0 error) { - if W.WUnreadByte == nil { - return - } +func (W _io_ByteScanner) UnreadByte() error { return W.WUnreadByte() } // _io_ByteWriter is an interface wrapper for ByteWriter type type _io_ByteWriter struct { IValue interface{} - WWriteByte func(c byte) (r0 error) + WWriteByte func(c byte) error } -func (W _io_ByteWriter) WriteByte(c byte) (r0 error) { - if W.WWriteByte == nil { - return - } +func (W _io_ByteWriter) WriteByte(c byte) error { return W.WWriteByte(c) } // _io_Closer is an interface wrapper for Closer type type _io_Closer struct { IValue interface{} - WClose func() (r0 error) + WClose func() error } -func (W _io_Closer) Close() (r0 error) { - if W.WClose == nil { - return - } +func (W _io_Closer) Close() error { return W.WClose() } // _io_ReadCloser is an interface wrapper for ReadCloser type type _io_ReadCloser struct { IValue interface{} - WClose func() (r0 error) + WClose func() error WRead func(p []byte) (n int, err error) } -func (W _io_ReadCloser) Close() (r0 error) { - if W.WClose == nil { - return - } +func (W _io_ReadCloser) Close() error { return W.WClose() } func (W _io_ReadCloser) Read(p []byte) (n int, err error) { - if W.WRead == nil { - return - } return W.WRead(p) } // _io_ReadSeekCloser is an interface wrapper for ReadSeekCloser type type _io_ReadSeekCloser struct { IValue interface{} - WClose func() (r0 error) + WClose func() error WRead func(p []byte) (n int, err error) - WSeek func(offset int64, whence int) (r0 int64, r1 error) + WSeek func(offset int64, whence int) (int64, error) } -func (W _io_ReadSeekCloser) Close() (r0 error) { - if W.WClose == nil { - return - } +func (W _io_ReadSeekCloser) Close() error { return W.WClose() } func (W _io_ReadSeekCloser) Read(p []byte) (n int, err error) { - if W.WRead == nil { - return - } return W.WRead(p) } -func (W _io_ReadSeekCloser) Seek(offset int64, whence int) (r0 int64, r1 error) { - if W.WSeek == nil { - return - } +func (W _io_ReadSeekCloser) Seek(offset int64, whence int) (int64, error) { return W.WSeek(offset, whence) } @@ -203,46 +173,31 @@ func (W _io_ReadSeekCloser) Seek(offset int64, whence int) (r0 int64, r1 error) type _io_ReadSeeker struct { IValue interface{} WRead func(p []byte) (n int, err error) - WSeek func(offset int64, whence int) (r0 int64, r1 error) + WSeek func(offset int64, whence int) (int64, error) } func (W _io_ReadSeeker) Read(p []byte) (n int, err error) { - if W.WRead == nil { - return - } return W.WRead(p) } -func (W _io_ReadSeeker) Seek(offset int64, whence int) (r0 int64, r1 error) { - if W.WSeek == nil { - return - } +func (W _io_ReadSeeker) Seek(offset int64, whence int) (int64, error) { return W.WSeek(offset, whence) } // _io_ReadWriteCloser is an interface wrapper for ReadWriteCloser type type _io_ReadWriteCloser struct { IValue interface{} - WClose func() (r0 error) + WClose func() error WRead func(p []byte) (n int, err error) WWrite func(p []byte) (n int, err error) } -func (W _io_ReadWriteCloser) Close() (r0 error) { - if W.WClose == nil { - return - } +func (W _io_ReadWriteCloser) Close() error { return W.WClose() } func (W _io_ReadWriteCloser) Read(p []byte) (n int, err error) { - if W.WRead == nil { - return - } return W.WRead(p) } func (W _io_ReadWriteCloser) Write(p []byte) (n int, err error) { - if W.WWrite == nil { - return - } return W.WWrite(p) } @@ -250,26 +205,17 @@ func (W _io_ReadWriteCloser) Write(p []byte) (n int, err error) { type _io_ReadWriteSeeker struct { IValue interface{} WRead func(p []byte) (n int, err error) - WSeek func(offset int64, whence int) (r0 int64, r1 error) + WSeek func(offset int64, whence int) (int64, error) WWrite func(p []byte) (n int, err error) } func (W _io_ReadWriteSeeker) Read(p []byte) (n int, err error) { - if W.WRead == nil { - return - } return W.WRead(p) } -func (W _io_ReadWriteSeeker) Seek(offset int64, whence int) (r0 int64, r1 error) { - if W.WSeek == nil { - return - } +func (W _io_ReadWriteSeeker) Seek(offset int64, whence int) (int64, error) { return W.WSeek(offset, whence) } func (W _io_ReadWriteSeeker) Write(p []byte) (n int, err error) { - if W.WWrite == nil { - return - } return W.WWrite(p) } @@ -281,15 +227,9 @@ type _io_ReadWriter struct { } func (W _io_ReadWriter) Read(p []byte) (n int, err error) { - if W.WRead == nil { - return - } return W.WRead(p) } func (W _io_ReadWriter) Write(p []byte) (n int, err error) { - if W.WWrite == nil { - return - } return W.WWrite(p) } @@ -300,9 +240,6 @@ type _io_Reader struct { } func (W _io_Reader) Read(p []byte) (n int, err error) { - if W.WRead == nil { - return - } return W.WRead(p) } @@ -313,9 +250,6 @@ type _io_ReaderAt struct { } func (W _io_ReaderAt) ReadAt(p []byte, off int64) (n int, err error) { - if W.WReadAt == nil { - return - } return W.WReadAt(p, off) } @@ -326,9 +260,6 @@ type _io_ReaderFrom struct { } func (W _io_ReaderFrom) ReadFrom(r io.Reader) (n int64, err error) { - if W.WReadFrom == nil { - return - } return W.WReadFrom(r) } @@ -339,9 +270,6 @@ type _io_RuneReader struct { } func (W _io_RuneReader) ReadRune() (r rune, size int, err error) { - if W.WReadRune == nil { - return - } return W.WReadRune() } @@ -349,32 +277,23 @@ func (W _io_RuneReader) ReadRune() (r rune, size int, err error) { type _io_RuneScanner struct { IValue interface{} WReadRune func() (r rune, size int, err error) - WUnreadRune func() (r0 error) + WUnreadRune func() error } func (W _io_RuneScanner) ReadRune() (r rune, size int, err error) { - if W.WReadRune == nil { - return - } return W.WReadRune() } -func (W _io_RuneScanner) UnreadRune() (r0 error) { - if W.WUnreadRune == nil { - return - } +func (W _io_RuneScanner) UnreadRune() error { return W.WUnreadRune() } // _io_Seeker is an interface wrapper for Seeker type type _io_Seeker struct { IValue interface{} - WSeek func(offset int64, whence int) (r0 int64, r1 error) + WSeek func(offset int64, whence int) (int64, error) } -func (W _io_Seeker) Seek(offset int64, whence int) (r0 int64, r1 error) { - if W.WSeek == nil { - return - } +func (W _io_Seeker) Seek(offset int64, whence int) (int64, error) { return W.WSeek(offset, whence) } @@ -385,49 +304,34 @@ type _io_StringWriter struct { } func (W _io_StringWriter) WriteString(s string) (n int, err error) { - if W.WWriteString == nil { - return - } return W.WWriteString(s) } // _io_WriteCloser is an interface wrapper for WriteCloser type type _io_WriteCloser struct { IValue interface{} - WClose func() (r0 error) + WClose func() error WWrite func(p []byte) (n int, err error) } -func (W _io_WriteCloser) Close() (r0 error) { - if W.WClose == nil { - return - } +func (W _io_WriteCloser) Close() error { return W.WClose() } func (W _io_WriteCloser) Write(p []byte) (n int, err error) { - if W.WWrite == nil { - return - } return W.WWrite(p) } // _io_WriteSeeker is an interface wrapper for WriteSeeker type type _io_WriteSeeker struct { IValue interface{} - WSeek func(offset int64, whence int) (r0 int64, r1 error) + WSeek func(offset int64, whence int) (int64, error) WWrite func(p []byte) (n int, err error) } -func (W _io_WriteSeeker) Seek(offset int64, whence int) (r0 int64, r1 error) { - if W.WSeek == nil { - return - } +func (W _io_WriteSeeker) Seek(offset int64, whence int) (int64, error) { return W.WSeek(offset, whence) } func (W _io_WriteSeeker) Write(p []byte) (n int, err error) { - if W.WWrite == nil { - return - } return W.WWrite(p) } @@ -438,9 +342,6 @@ type _io_Writer struct { } func (W _io_Writer) Write(p []byte) (n int, err error) { - if W.WWrite == nil { - return - } return W.WWrite(p) } @@ -451,9 +352,6 @@ type _io_WriterAt struct { } func (W _io_WriterAt) WriteAt(p []byte, off int64) (n int, err error) { - if W.WWriteAt == nil { - return - } return W.WWriteAt(p, off) } @@ -464,8 +362,5 @@ type _io_WriterTo struct { } func (W _io_WriterTo) WriteTo(w io.Writer) (n int64, err error) { - if W.WWriteTo == nil { - return - } return W.WWriteTo(w) } diff --git a/stdlib/math-rand.go b/stdlib/math-rand.go index 8ec6a90..d97461f 100644 --- a/stdlib/math-rand.go +++ b/stdlib/math-rand.go @@ -47,46 +47,31 @@ func init() { // _math_rand_Source is an interface wrapper for Source type type _math_rand_Source struct { IValue interface{} - WInt63 func() (r0 int64) + WInt63 func() int64 WSeed func(seed int64) } -func (W _math_rand_Source) Int63() (r0 int64) { - if W.WInt63 == nil { - return - } +func (W _math_rand_Source) Int63() int64 { return W.WInt63() } func (W _math_rand_Source) Seed(seed int64) { - if W.WSeed == nil { - return - } W.WSeed(seed) } // _math_rand_Source64 is an interface wrapper for Source64 type type _math_rand_Source64 struct { IValue interface{} - WInt63 func() (r0 int64) + WInt63 func() int64 WSeed func(seed int64) - WUint64 func() (r0 uint64) + WUint64 func() uint64 } -func (W _math_rand_Source64) Int63() (r0 int64) { - if W.WInt63 == nil { - return - } +func (W _math_rand_Source64) Int63() int64 { return W.WInt63() } func (W _math_rand_Source64) Seed(seed int64) { - if W.WSeed == nil { - return - } W.WSeed(seed) } -func (W _math_rand_Source64) Uint64() (r0 uint64) { - if W.WUint64 == nil { - return - } +func (W _math_rand_Source64) Uint64() uint64 { return W.WUint64() } diff --git a/stdlib/mime-multipart.go b/stdlib/mime-multipart.go index fa5b099..75b9f4c 100644 --- a/stdlib/mime-multipart.go +++ b/stdlib/mime-multipart.go @@ -32,33 +32,21 @@ func init() { // _mime_multipart_File is an interface wrapper for File type type _mime_multipart_File struct { IValue interface{} - WClose func() (r0 error) + WClose func() error WRead func(p []byte) (n int, err error) WReadAt func(p []byte, off int64) (n int, err error) - WSeek func(offset int64, whence int) (r0 int64, r1 error) + WSeek func(offset int64, whence int) (int64, error) } -func (W _mime_multipart_File) Close() (r0 error) { - if W.WClose == nil { - return - } +func (W _mime_multipart_File) Close() error { return W.WClose() } func (W _mime_multipart_File) Read(p []byte) (n int, err error) { - if W.WRead == nil { - return - } return W.WRead(p) } func (W _mime_multipart_File) ReadAt(p []byte, off int64) (n int, err error) { - if W.WReadAt == nil { - return - } return W.WReadAt(p, off) } -func (W _mime_multipart_File) Seek(offset int64, whence int) (r0 int64, r1 error) { - if W.WSeek == nil { - return - } +func (W _mime_multipart_File) Seek(offset int64, whence int) (int64, error) { return W.WSeek(offset, whence) } diff --git a/stdlib/net-http-cookiejar.go b/stdlib/net-http-cookiejar.go index c7ce6c3..bd47cae 100644 --- a/stdlib/net-http-cookiejar.go +++ b/stdlib/net-http-cookiejar.go @@ -27,19 +27,16 @@ func init() { // _net_http_cookiejar_PublicSuffixList is an interface wrapper for PublicSuffixList type type _net_http_cookiejar_PublicSuffixList struct { IValue interface{} - WPublicSuffix func(domain string) (r0 string) - WString func() (r0 string) + WPublicSuffix func(domain string) string + WString func() string } -func (W _net_http_cookiejar_PublicSuffixList) PublicSuffix(domain string) (r0 string) { - if W.WPublicSuffix == nil { - return - } +func (W _net_http_cookiejar_PublicSuffixList) PublicSuffix(domain string) string { return W.WPublicSuffix(domain) } -func (W _net_http_cookiejar_PublicSuffixList) String() (r0 string) { +func (W _net_http_cookiejar_PublicSuffixList) String() string { if W.WString == nil { - return + return "" } return W.WString() } diff --git a/stdlib/net-http-httputil.go b/stdlib/net-http-httputil.go index 5d956bf..4816252 100644 --- a/stdlib/net-http-httputil.go +++ b/stdlib/net-http-httputil.go @@ -40,19 +40,13 @@ func init() { // _net_http_httputil_BufferPool is an interface wrapper for BufferPool type type _net_http_httputil_BufferPool struct { IValue interface{} - WGet func() (r0 []byte) + WGet func() []byte WPut func(a0 []byte) } -func (W _net_http_httputil_BufferPool) Get() (r0 []byte) { - if W.WGet == nil { - return - } +func (W _net_http_httputil_BufferPool) Get() []byte { return W.WGet() } func (W _net_http_httputil_BufferPool) Put(a0 []byte) { - if W.WPut == nil { - return - } W.WPut(a0) } diff --git a/stdlib/net-http.go b/stdlib/net-http.go index 6df549c..c6bdd1f 100644 --- a/stdlib/net-http.go +++ b/stdlib/net-http.go @@ -209,87 +209,60 @@ func init() { // _net_http_CloseNotifier is an interface wrapper for CloseNotifier type type _net_http_CloseNotifier struct { IValue interface{} - WCloseNotify func() (r0 <-chan bool) + WCloseNotify func() <-chan bool } -func (W _net_http_CloseNotifier) CloseNotify() (r0 <-chan bool) { - if W.WCloseNotify == nil { - return - } +func (W _net_http_CloseNotifier) CloseNotify() <-chan bool { return W.WCloseNotify() } // _net_http_CookieJar is an interface wrapper for CookieJar type type _net_http_CookieJar struct { IValue interface{} - WCookies func(u *url.URL) (r0 []*http.Cookie) + WCookies func(u *url.URL) []*http.Cookie WSetCookies func(u *url.URL, cookies []*http.Cookie) } -func (W _net_http_CookieJar) Cookies(u *url.URL) (r0 []*http.Cookie) { - if W.WCookies == nil { - return - } +func (W _net_http_CookieJar) Cookies(u *url.URL) []*http.Cookie { return W.WCookies(u) } func (W _net_http_CookieJar) SetCookies(u *url.URL, cookies []*http.Cookie) { - if W.WSetCookies == nil { - return - } W.WSetCookies(u, cookies) } // _net_http_File is an interface wrapper for File type type _net_http_File struct { IValue interface{} - WClose func() (r0 error) + WClose func() error WRead func(p []byte) (n int, err error) - WReaddir func(count int) (r0 []fs.FileInfo, r1 error) - WSeek func(offset int64, whence int) (r0 int64, r1 error) - WStat func() (r0 fs.FileInfo, r1 error) + WReaddir func(count int) ([]fs.FileInfo, error) + WSeek func(offset int64, whence int) (int64, error) + WStat func() (fs.FileInfo, error) } -func (W _net_http_File) Close() (r0 error) { - if W.WClose == nil { - return - } +func (W _net_http_File) Close() error { return W.WClose() } func (W _net_http_File) Read(p []byte) (n int, err error) { - if W.WRead == nil { - return - } return W.WRead(p) } -func (W _net_http_File) Readdir(count int) (r0 []fs.FileInfo, r1 error) { - if W.WReaddir == nil { - return - } +func (W _net_http_File) Readdir(count int) ([]fs.FileInfo, error) { return W.WReaddir(count) } -func (W _net_http_File) Seek(offset int64, whence int) (r0 int64, r1 error) { - if W.WSeek == nil { - return - } +func (W _net_http_File) Seek(offset int64, whence int) (int64, error) { return W.WSeek(offset, whence) } -func (W _net_http_File) Stat() (r0 fs.FileInfo, r1 error) { - if W.WStat == nil { - return - } +func (W _net_http_File) Stat() (fs.FileInfo, error) { return W.WStat() } // _net_http_FileSystem is an interface wrapper for FileSystem type type _net_http_FileSystem struct { IValue interface{} - WOpen func(name string) (r0 http.File, r1 error) + WOpen func(name string) (http.File, error) } -func (W _net_http_FileSystem) Open(name string) (r0 http.File, r1 error) { - if W.WOpen == nil { - return - } +func (W _net_http_FileSystem) Open(name string) (http.File, error) { return W.WOpen(name) } @@ -300,9 +273,6 @@ type _net_http_Flusher struct { } func (W _net_http_Flusher) Flush() { - if W.WFlush == nil { - return - } W.WFlush() } @@ -313,74 +283,53 @@ type _net_http_Handler struct { } func (W _net_http_Handler) ServeHTTP(a0 http.ResponseWriter, a1 *http.Request) { - if W.WServeHTTP == nil { - return - } W.WServeHTTP(a0, a1) } // _net_http_Hijacker is an interface wrapper for Hijacker type type _net_http_Hijacker struct { IValue interface{} - WHijack func() (r0 net.Conn, r1 *bufio.ReadWriter, r2 error) + WHijack func() (net.Conn, *bufio.ReadWriter, error) } -func (W _net_http_Hijacker) Hijack() (r0 net.Conn, r1 *bufio.ReadWriter, r2 error) { - if W.WHijack == nil { - return - } +func (W _net_http_Hijacker) Hijack() (net.Conn, *bufio.ReadWriter, error) { return W.WHijack() } // _net_http_Pusher is an interface wrapper for Pusher type type _net_http_Pusher struct { IValue interface{} - WPush func(target string, opts *http.PushOptions) (r0 error) + WPush func(target string, opts *http.PushOptions) error } -func (W _net_http_Pusher) Push(target string, opts *http.PushOptions) (r0 error) { - if W.WPush == nil { - return - } +func (W _net_http_Pusher) Push(target string, opts *http.PushOptions) error { return W.WPush(target, opts) } // _net_http_ResponseWriter is an interface wrapper for ResponseWriter type type _net_http_ResponseWriter struct { IValue interface{} - WHeader func() (r0 http.Header) - WWrite func(a0 []byte) (r0 int, r1 error) + WHeader func() http.Header + WWrite func(a0 []byte) (int, error) WWriteHeader func(statusCode int) } -func (W _net_http_ResponseWriter) Header() (r0 http.Header) { - if W.WHeader == nil { - return - } +func (W _net_http_ResponseWriter) Header() http.Header { return W.WHeader() } -func (W _net_http_ResponseWriter) Write(a0 []byte) (r0 int, r1 error) { - if W.WWrite == nil { - return - } +func (W _net_http_ResponseWriter) Write(a0 []byte) (int, error) { return W.WWrite(a0) } func (W _net_http_ResponseWriter) WriteHeader(statusCode int) { - if W.WWriteHeader == nil { - return - } W.WWriteHeader(statusCode) } // _net_http_RoundTripper is an interface wrapper for RoundTripper type type _net_http_RoundTripper struct { IValue interface{} - WRoundTrip func(a0 *http.Request) (r0 *http.Response, r1 error) + WRoundTrip func(a0 *http.Request) (*http.Response, error) } -func (W _net_http_RoundTripper) RoundTrip(a0 *http.Request) (r0 *http.Response, r1 error) { - if W.WRoundTrip == nil { - return - } +func (W _net_http_RoundTripper) RoundTrip(a0 *http.Request) (*http.Response, error) { return W.WRoundTrip(a0) } diff --git a/stdlib/net-rpc.go b/stdlib/net-rpc.go index f2201fb..176bc17 100644 --- a/stdlib/net-rpc.go +++ b/stdlib/net-rpc.go @@ -51,67 +51,43 @@ func init() { // _net_rpc_ClientCodec is an interface wrapper for ClientCodec type type _net_rpc_ClientCodec struct { IValue interface{} - WClose func() (r0 error) - WReadResponseBody func(a0 interface{}) (r0 error) - WReadResponseHeader func(a0 *rpc.Response) (r0 error) - WWriteRequest func(a0 *rpc.Request, a1 interface{}) (r0 error) + WClose func() error + WReadResponseBody func(a0 interface{}) error + WReadResponseHeader func(a0 *rpc.Response) error + WWriteRequest func(a0 *rpc.Request, a1 interface{}) error } -func (W _net_rpc_ClientCodec) Close() (r0 error) { - if W.WClose == nil { - return - } +func (W _net_rpc_ClientCodec) Close() error { return W.WClose() } -func (W _net_rpc_ClientCodec) ReadResponseBody(a0 interface{}) (r0 error) { - if W.WReadResponseBody == nil { - return - } +func (W _net_rpc_ClientCodec) ReadResponseBody(a0 interface{}) error { return W.WReadResponseBody(a0) } -func (W _net_rpc_ClientCodec) ReadResponseHeader(a0 *rpc.Response) (r0 error) { - if W.WReadResponseHeader == nil { - return - } +func (W _net_rpc_ClientCodec) ReadResponseHeader(a0 *rpc.Response) error { return W.WReadResponseHeader(a0) } -func (W _net_rpc_ClientCodec) WriteRequest(a0 *rpc.Request, a1 interface{}) (r0 error) { - if W.WWriteRequest == nil { - return - } +func (W _net_rpc_ClientCodec) WriteRequest(a0 *rpc.Request, a1 interface{}) error { return W.WWriteRequest(a0, a1) } // _net_rpc_ServerCodec is an interface wrapper for ServerCodec type type _net_rpc_ServerCodec struct { IValue interface{} - WClose func() (r0 error) - WReadRequestBody func(a0 interface{}) (r0 error) - WReadRequestHeader func(a0 *rpc.Request) (r0 error) - WWriteResponse func(a0 *rpc.Response, a1 interface{}) (r0 error) + WClose func() error + WReadRequestBody func(a0 interface{}) error + WReadRequestHeader func(a0 *rpc.Request) error + WWriteResponse func(a0 *rpc.Response, a1 interface{}) error } -func (W _net_rpc_ServerCodec) Close() (r0 error) { - if W.WClose == nil { - return - } +func (W _net_rpc_ServerCodec) Close() error { return W.WClose() } -func (W _net_rpc_ServerCodec) ReadRequestBody(a0 interface{}) (r0 error) { - if W.WReadRequestBody == nil { - return - } +func (W _net_rpc_ServerCodec) ReadRequestBody(a0 interface{}) error { return W.WReadRequestBody(a0) } -func (W _net_rpc_ServerCodec) ReadRequestHeader(a0 *rpc.Request) (r0 error) { - if W.WReadRequestHeader == nil { - return - } +func (W _net_rpc_ServerCodec) ReadRequestHeader(a0 *rpc.Request) error { return W.WReadRequestHeader(a0) } -func (W _net_rpc_ServerCodec) WriteResponse(a0 *rpc.Response, a1 interface{}) (r0 error) { - if W.WWriteResponse == nil { - return - } +func (W _net_rpc_ServerCodec) WriteResponse(a0 *rpc.Response, a1 interface{}) error { return W.WWriteResponse(a0, a1) } diff --git a/stdlib/net-smtp.go b/stdlib/net-smtp.go index 87a2efe..3377722 100644 --- a/stdlib/net-smtp.go +++ b/stdlib/net-smtp.go @@ -36,14 +36,8 @@ type _net_smtp_Auth struct { } func (W _net_smtp_Auth) Next(fromServer []byte, more bool) (toServer []byte, err error) { - if W.WNext == nil { - return - } return W.WNext(fromServer, more) } func (W _net_smtp_Auth) Start(server *smtp.ServerInfo) (proto string, toServer []byte, err error) { - if W.WStart == nil { - return - } return W.WStart(server) } diff --git a/stdlib/net.go b/stdlib/net.go index 902ac2f..f3e3d5e 100644 --- a/stdlib/net.go +++ b/stdlib/net.go @@ -128,19 +128,16 @@ func init() { // _net_Addr is an interface wrapper for Addr type type _net_Addr struct { IValue interface{} - WNetwork func() (r0 string) - WString func() (r0 string) + WNetwork func() string + WString func() string } -func (W _net_Addr) Network() (r0 string) { - if W.WNetwork == nil { - return - } +func (W _net_Addr) Network() string { return W.WNetwork() } -func (W _net_Addr) String() (r0 string) { +func (W _net_Addr) String() string { if W.WString == nil { - return + return "" } return W.WString() } @@ -148,170 +145,107 @@ func (W _net_Addr) String() (r0 string) { // _net_Conn is an interface wrapper for Conn type type _net_Conn struct { IValue interface{} - WClose func() (r0 error) - WLocalAddr func() (r0 net.Addr) + WClose func() error + WLocalAddr func() net.Addr WRead func(b []byte) (n int, err error) - WRemoteAddr func() (r0 net.Addr) - WSetDeadline func(t time.Time) (r0 error) - WSetReadDeadline func(t time.Time) (r0 error) - WSetWriteDeadline func(t time.Time) (r0 error) + WRemoteAddr func() net.Addr + WSetDeadline func(t time.Time) error + WSetReadDeadline func(t time.Time) error + WSetWriteDeadline func(t time.Time) error WWrite func(b []byte) (n int, err error) } -func (W _net_Conn) Close() (r0 error) { - if W.WClose == nil { - return - } +func (W _net_Conn) Close() error { return W.WClose() } -func (W _net_Conn) LocalAddr() (r0 net.Addr) { - if W.WLocalAddr == nil { - return - } +func (W _net_Conn) LocalAddr() net.Addr { return W.WLocalAddr() } func (W _net_Conn) Read(b []byte) (n int, err error) { - if W.WRead == nil { - return - } return W.WRead(b) } -func (W _net_Conn) RemoteAddr() (r0 net.Addr) { - if W.WRemoteAddr == nil { - return - } +func (W _net_Conn) RemoteAddr() net.Addr { return W.WRemoteAddr() } -func (W _net_Conn) SetDeadline(t time.Time) (r0 error) { - if W.WSetDeadline == nil { - return - } +func (W _net_Conn) SetDeadline(t time.Time) error { return W.WSetDeadline(t) } -func (W _net_Conn) SetReadDeadline(t time.Time) (r0 error) { - if W.WSetReadDeadline == nil { - return - } +func (W _net_Conn) SetReadDeadline(t time.Time) error { return W.WSetReadDeadline(t) } -func (W _net_Conn) SetWriteDeadline(t time.Time) (r0 error) { - if W.WSetWriteDeadline == nil { - return - } +func (W _net_Conn) SetWriteDeadline(t time.Time) error { return W.WSetWriteDeadline(t) } func (W _net_Conn) Write(b []byte) (n int, err error) { - if W.WWrite == nil { - return - } return W.WWrite(b) } // _net_Error is an interface wrapper for Error type type _net_Error struct { IValue interface{} - WError func() (r0 string) - WTemporary func() (r0 bool) - WTimeout func() (r0 bool) + WError func() string + WTemporary func() bool + WTimeout func() bool } -func (W _net_Error) Error() (r0 string) { - if W.WError == nil { - return - } +func (W _net_Error) Error() string { return W.WError() } -func (W _net_Error) Temporary() (r0 bool) { - if W.WTemporary == nil { - return - } +func (W _net_Error) Temporary() bool { return W.WTemporary() } -func (W _net_Error) Timeout() (r0 bool) { - if W.WTimeout == nil { - return - } +func (W _net_Error) Timeout() bool { return W.WTimeout() } // _net_Listener is an interface wrapper for Listener type type _net_Listener struct { IValue interface{} - WAccept func() (r0 net.Conn, r1 error) - WAddr func() (r0 net.Addr) - WClose func() (r0 error) + WAccept func() (net.Conn, error) + WAddr func() net.Addr + WClose func() error } -func (W _net_Listener) Accept() (r0 net.Conn, r1 error) { - if W.WAccept == nil { - return - } +func (W _net_Listener) Accept() (net.Conn, error) { return W.WAccept() } -func (W _net_Listener) Addr() (r0 net.Addr) { - if W.WAddr == nil { - return - } +func (W _net_Listener) Addr() net.Addr { return W.WAddr() } -func (W _net_Listener) Close() (r0 error) { - if W.WClose == nil { - return - } +func (W _net_Listener) Close() error { return W.WClose() } // _net_PacketConn is an interface wrapper for PacketConn type type _net_PacketConn struct { IValue interface{} - WClose func() (r0 error) - WLocalAddr func() (r0 net.Addr) + WClose func() error + WLocalAddr func() net.Addr WReadFrom func(p []byte) (n int, addr net.Addr, err error) - WSetDeadline func(t time.Time) (r0 error) - WSetReadDeadline func(t time.Time) (r0 error) - WSetWriteDeadline func(t time.Time) (r0 error) + WSetDeadline func(t time.Time) error + WSetReadDeadline func(t time.Time) error + WSetWriteDeadline func(t time.Time) error WWriteTo func(p []byte, addr net.Addr) (n int, err error) } -func (W _net_PacketConn) Close() (r0 error) { - if W.WClose == nil { - return - } +func (W _net_PacketConn) Close() error { return W.WClose() } -func (W _net_PacketConn) LocalAddr() (r0 net.Addr) { - if W.WLocalAddr == nil { - return - } +func (W _net_PacketConn) LocalAddr() net.Addr { return W.WLocalAddr() } func (W _net_PacketConn) ReadFrom(p []byte) (n int, addr net.Addr, err error) { - if W.WReadFrom == nil { - return - } return W.WReadFrom(p) } -func (W _net_PacketConn) SetDeadline(t time.Time) (r0 error) { - if W.WSetDeadline == nil { - return - } +func (W _net_PacketConn) SetDeadline(t time.Time) error { return W.WSetDeadline(t) } -func (W _net_PacketConn) SetReadDeadline(t time.Time) (r0 error) { - if W.WSetReadDeadline == nil { - return - } +func (W _net_PacketConn) SetReadDeadline(t time.Time) error { return W.WSetReadDeadline(t) } -func (W _net_PacketConn) SetWriteDeadline(t time.Time) (r0 error) { - if W.WSetWriteDeadline == nil { - return - } +func (W _net_PacketConn) SetWriteDeadline(t time.Time) error { return W.WSetWriteDeadline(t) } func (W _net_PacketConn) WriteTo(p []byte, addr net.Addr) (n int, err error) { - if W.WWriteTo == nil { - return - } return W.WWriteTo(p, addr) } diff --git a/stdlib/os.go b/stdlib/os.go index 06954bb..071fe6a 100644 --- a/stdlib/os.go +++ b/stdlib/os.go @@ -143,82 +143,52 @@ func init() { // _os_DirEntry is an interface wrapper for DirEntry type type _os_DirEntry struct { IValue interface{} - WInfo func() (r0 fs.FileInfo, r1 error) - WIsDir func() (r0 bool) - WName func() (r0 string) - WType func() (r0 fs.FileMode) + WInfo func() (fs.FileInfo, error) + WIsDir func() bool + WName func() string + WType func() fs.FileMode } -func (W _os_DirEntry) Info() (r0 fs.FileInfo, r1 error) { - if W.WInfo == nil { - return - } +func (W _os_DirEntry) Info() (fs.FileInfo, error) { return W.WInfo() } -func (W _os_DirEntry) IsDir() (r0 bool) { - if W.WIsDir == nil { - return - } +func (W _os_DirEntry) IsDir() bool { return W.WIsDir() } -func (W _os_DirEntry) Name() (r0 string) { - if W.WName == nil { - return - } +func (W _os_DirEntry) Name() string { return W.WName() } -func (W _os_DirEntry) Type() (r0 fs.FileMode) { - if W.WType == nil { - return - } +func (W _os_DirEntry) Type() fs.FileMode { return W.WType() } // _os_FileInfo is an interface wrapper for FileInfo type type _os_FileInfo struct { IValue interface{} - WIsDir func() (r0 bool) - WModTime func() (r0 time.Time) - WMode func() (r0 fs.FileMode) - WName func() (r0 string) - WSize func() (r0 int64) - WSys func() (r0 interface{}) + WIsDir func() bool + WModTime func() time.Time + WMode func() fs.FileMode + WName func() string + WSize func() int64 + WSys func() interface{} } -func (W _os_FileInfo) IsDir() (r0 bool) { - if W.WIsDir == nil { - return - } +func (W _os_FileInfo) IsDir() bool { return W.WIsDir() } -func (W _os_FileInfo) ModTime() (r0 time.Time) { - if W.WModTime == nil { - return - } +func (W _os_FileInfo) ModTime() time.Time { return W.WModTime() } -func (W _os_FileInfo) Mode() (r0 fs.FileMode) { - if W.WMode == nil { - return - } +func (W _os_FileInfo) Mode() fs.FileMode { return W.WMode() } -func (W _os_FileInfo) Name() (r0 string) { - if W.WName == nil { - return - } +func (W _os_FileInfo) Name() string { return W.WName() } -func (W _os_FileInfo) Size() (r0 int64) { - if W.WSize == nil { - return - } +func (W _os_FileInfo) Size() int64 { return W.WSize() } -func (W _os_FileInfo) Sys() (r0 interface{}) { - if W.WSys == nil { - return - } +func (W _os_FileInfo) Sys() interface{} { return W.WSys() } @@ -226,18 +196,15 @@ func (W _os_FileInfo) Sys() (r0 interface{}) { type _os_Signal struct { IValue interface{} WSignal func() - WString func() (r0 string) + WString func() string } func (W _os_Signal) Signal() { - if W.WSignal == nil { - return - } W.WSignal() } -func (W _os_Signal) String() (r0 string) { +func (W _os_Signal) String() string { if W.WString == nil { - return + return "" } return W.WString() } diff --git a/stdlib/reflect.go b/stdlib/reflect.go index 3dce2f1..a53b096 100644 --- a/stdlib/reflect.go +++ b/stdlib/reflect.go @@ -92,208 +92,124 @@ func init() { // _reflect_Type is an interface wrapper for Type type type _reflect_Type struct { IValue interface{} - WAlign func() (r0 int) - WAssignableTo func(u reflect.Type) (r0 bool) - WBits func() (r0 int) - WChanDir func() (r0 reflect.ChanDir) - WComparable func() (r0 bool) - WConvertibleTo func(u reflect.Type) (r0 bool) - WElem func() (r0 reflect.Type) - WField func(i int) (r0 reflect.StructField) - WFieldAlign func() (r0 int) - WFieldByIndex func(index []int) (r0 reflect.StructField) - WFieldByName func(name string) (r0 reflect.StructField, r1 bool) - WFieldByNameFunc func(match func(string) bool) (r0 reflect.StructField, r1 bool) - WImplements func(u reflect.Type) (r0 bool) - WIn func(i int) (r0 reflect.Type) - WIsVariadic func() (r0 bool) - WKey func() (r0 reflect.Type) - WKind func() (r0 reflect.Kind) - WLen func() (r0 int) - WMethod func(a0 int) (r0 reflect.Method) - WMethodByName func(a0 string) (r0 reflect.Method, r1 bool) - WName func() (r0 string) - WNumField func() (r0 int) - WNumIn func() (r0 int) - WNumMethod func() (r0 int) - WNumOut func() (r0 int) - WOut func(i int) (r0 reflect.Type) - WPkgPath func() (r0 string) - WSize func() (r0 uintptr) - WString func() (r0 string) + WAlign func() int + WAssignableTo func(u reflect.Type) bool + WBits func() int + WChanDir func() reflect.ChanDir + WComparable func() bool + WConvertibleTo func(u reflect.Type) bool + WElem func() reflect.Type + WField func(i int) reflect.StructField + WFieldAlign func() int + WFieldByIndex func(index []int) reflect.StructField + WFieldByName func(name string) (reflect.StructField, bool) + WFieldByNameFunc func(match func(string) bool) (reflect.StructField, bool) + WImplements func(u reflect.Type) bool + WIn func(i int) reflect.Type + WIsVariadic func() bool + WKey func() reflect.Type + WKind func() reflect.Kind + WLen func() int + WMethod func(a0 int) reflect.Method + WMethodByName func(a0 string) (reflect.Method, bool) + WName func() string + WNumField func() int + WNumIn func() int + WNumMethod func() int + WNumOut func() int + WOut func(i int) reflect.Type + WPkgPath func() string + WSize func() uintptr + WString func() string } -func (W _reflect_Type) Align() (r0 int) { - if W.WAlign == nil { - return - } +func (W _reflect_Type) Align() int { return W.WAlign() } -func (W _reflect_Type) AssignableTo(u reflect.Type) (r0 bool) { - if W.WAssignableTo == nil { - return - } +func (W _reflect_Type) AssignableTo(u reflect.Type) bool { return W.WAssignableTo(u) } -func (W _reflect_Type) Bits() (r0 int) { - if W.WBits == nil { - return - } +func (W _reflect_Type) Bits() int { return W.WBits() } -func (W _reflect_Type) ChanDir() (r0 reflect.ChanDir) { - if W.WChanDir == nil { - return - } +func (W _reflect_Type) ChanDir() reflect.ChanDir { return W.WChanDir() } -func (W _reflect_Type) Comparable() (r0 bool) { - if W.WComparable == nil { - return - } +func (W _reflect_Type) Comparable() bool { return W.WComparable() } -func (W _reflect_Type) ConvertibleTo(u reflect.Type) (r0 bool) { - if W.WConvertibleTo == nil { - return - } +func (W _reflect_Type) ConvertibleTo(u reflect.Type) bool { return W.WConvertibleTo(u) } -func (W _reflect_Type) Elem() (r0 reflect.Type) { - if W.WElem == nil { - return - } +func (W _reflect_Type) Elem() reflect.Type { return W.WElem() } -func (W _reflect_Type) Field(i int) (r0 reflect.StructField) { - if W.WField == nil { - return - } +func (W _reflect_Type) Field(i int) reflect.StructField { return W.WField(i) } -func (W _reflect_Type) FieldAlign() (r0 int) { - if W.WFieldAlign == nil { - return - } +func (W _reflect_Type) FieldAlign() int { return W.WFieldAlign() } -func (W _reflect_Type) FieldByIndex(index []int) (r0 reflect.StructField) { - if W.WFieldByIndex == nil { - return - } +func (W _reflect_Type) FieldByIndex(index []int) reflect.StructField { return W.WFieldByIndex(index) } -func (W _reflect_Type) FieldByName(name string) (r0 reflect.StructField, r1 bool) { - if W.WFieldByName == nil { - return - } +func (W _reflect_Type) FieldByName(name string) (reflect.StructField, bool) { return W.WFieldByName(name) } -func (W _reflect_Type) FieldByNameFunc(match func(string) bool) (r0 reflect.StructField, r1 bool) { - if W.WFieldByNameFunc == nil { - return - } +func (W _reflect_Type) FieldByNameFunc(match func(string) bool) (reflect.StructField, bool) { return W.WFieldByNameFunc(match) } -func (W _reflect_Type) Implements(u reflect.Type) (r0 bool) { - if W.WImplements == nil { - return - } +func (W _reflect_Type) Implements(u reflect.Type) bool { return W.WImplements(u) } -func (W _reflect_Type) In(i int) (r0 reflect.Type) { - if W.WIn == nil { - return - } +func (W _reflect_Type) In(i int) reflect.Type { return W.WIn(i) } -func (W _reflect_Type) IsVariadic() (r0 bool) { - if W.WIsVariadic == nil { - return - } +func (W _reflect_Type) IsVariadic() bool { return W.WIsVariadic() } -func (W _reflect_Type) Key() (r0 reflect.Type) { - if W.WKey == nil { - return - } +func (W _reflect_Type) Key() reflect.Type { return W.WKey() } -func (W _reflect_Type) Kind() (r0 reflect.Kind) { - if W.WKind == nil { - return - } +func (W _reflect_Type) Kind() reflect.Kind { return W.WKind() } -func (W _reflect_Type) Len() (r0 int) { - if W.WLen == nil { - return - } +func (W _reflect_Type) Len() int { return W.WLen() } -func (W _reflect_Type) Method(a0 int) (r0 reflect.Method) { - if W.WMethod == nil { - return - } +func (W _reflect_Type) Method(a0 int) reflect.Method { return W.WMethod(a0) } -func (W _reflect_Type) MethodByName(a0 string) (r0 reflect.Method, r1 bool) { - if W.WMethodByName == nil { - return - } +func (W _reflect_Type) MethodByName(a0 string) (reflect.Method, bool) { return W.WMethodByName(a0) } -func (W _reflect_Type) Name() (r0 string) { - if W.WName == nil { - return - } +func (W _reflect_Type) Name() string { return W.WName() } -func (W _reflect_Type) NumField() (r0 int) { - if W.WNumField == nil { - return - } +func (W _reflect_Type) NumField() int { return W.WNumField() } -func (W _reflect_Type) NumIn() (r0 int) { - if W.WNumIn == nil { - return - } +func (W _reflect_Type) NumIn() int { return W.WNumIn() } -func (W _reflect_Type) NumMethod() (r0 int) { - if W.WNumMethod == nil { - return - } +func (W _reflect_Type) NumMethod() int { return W.WNumMethod() } -func (W _reflect_Type) NumOut() (r0 int) { - if W.WNumOut == nil { - return - } +func (W _reflect_Type) NumOut() int { return W.WNumOut() } -func (W _reflect_Type) Out(i int) (r0 reflect.Type) { - if W.WOut == nil { - return - } +func (W _reflect_Type) Out(i int) reflect.Type { return W.WOut(i) } -func (W _reflect_Type) PkgPath() (r0 string) { - if W.WPkgPath == nil { - return - } +func (W _reflect_Type) PkgPath() string { return W.WPkgPath() } -func (W _reflect_Type) Size() (r0 uintptr) { - if W.WSize == nil { - return - } +func (W _reflect_Type) Size() uintptr { return W.WSize() } -func (W _reflect_Type) String() (r0 string) { +func (W _reflect_Type) String() string { if W.WString == nil { - return + return "" } return W.WString() } diff --git a/stdlib/runtime.go b/stdlib/runtime.go index f2d43fa..fec1c18 100644 --- a/stdlib/runtime.go +++ b/stdlib/runtime.go @@ -69,19 +69,13 @@ func init() { // _runtime_Error is an interface wrapper for Error type type _runtime_Error struct { IValue interface{} - WError func() (r0 string) + WError func() string WRuntimeError func() } -func (W _runtime_Error) Error() (r0 string) { - if W.WError == nil { - return - } +func (W _runtime_Error) Error() string { return W.WError() } func (W _runtime_Error) RuntimeError() { - if W.WRuntimeError == nil { - return - } W.WRuntimeError() } diff --git a/stdlib/sort.go b/stdlib/sort.go index 77c868a..39d11ef 100644 --- a/stdlib/sort.go +++ b/stdlib/sort.go @@ -44,26 +44,17 @@ func init() { // _sort_Interface is an interface wrapper for Interface type type _sort_Interface struct { IValue interface{} - WLen func() (r0 int) - WLess func(i int, j int) (r0 bool) + WLen func() int + WLess func(i int, j int) bool WSwap func(i int, j int) } -func (W _sort_Interface) Len() (r0 int) { - if W.WLen == nil { - return - } +func (W _sort_Interface) Len() int { return W.WLen() } -func (W _sort_Interface) Less(i int, j int) (r0 bool) { - if W.WLess == nil { - return - } +func (W _sort_Interface) Less(i int, j int) bool { return W.WLess(i, j) } func (W _sort_Interface) Swap(i int, j int) { - if W.WSwap == nil { - return - } W.WSwap(i, j) } diff --git a/stdlib/sync.go b/stdlib/sync.go index c27a30d..8c55607 100644 --- a/stdlib/sync.go +++ b/stdlib/sync.go @@ -37,14 +37,8 @@ type _sync_Locker struct { } func (W _sync_Locker) Lock() { - if W.WLock == nil { - return - } W.WLock() } func (W _sync_Locker) Unlock() { - if W.WUnlock == nil { - return - } W.WUnlock() } diff --git a/stdlib/testing-quick.go b/stdlib/testing-quick.go index 3df241c..f60f942 100644 --- a/stdlib/testing-quick.go +++ b/stdlib/testing-quick.go @@ -32,12 +32,9 @@ func init() { // _testing_quick_Generator is an interface wrapper for Generator type type _testing_quick_Generator struct { IValue interface{} - WGenerate func(rand *rand.Rand, size int) (r0 reflect.Value) + WGenerate func(rand *rand.Rand, size int) reflect.Value } -func (W _testing_quick_Generator) Generate(rand *rand.Rand, size int) (r0 reflect.Value) { - if W.WGenerate == nil { - return - } +func (W _testing_quick_Generator) Generate(rand *rand.Rand, size int) reflect.Value { return W.WGenerate(rand, size) } diff --git a/stdlib/testing.go b/stdlib/testing.go index 427f611..ec5efe7 100644 --- a/stdlib/testing.go +++ b/stdlib/testing.go @@ -52,119 +52,68 @@ type _testing_TB struct { WErrorf func(format string, args ...interface{}) WFail func() WFailNow func() - WFailed func() (r0 bool) + WFailed func() bool WFatal func(args ...interface{}) WFatalf func(format string, args ...interface{}) WHelper func() WLog func(args ...interface{}) WLogf func(format string, args ...interface{}) - WName func() (r0 string) + WName func() string WSkip func(args ...interface{}) WSkipNow func() WSkipf func(format string, args ...interface{}) - WSkipped func() (r0 bool) - WTempDir func() (r0 string) + WSkipped func() bool + WTempDir func() string } func (W _testing_TB) Cleanup(a0 func()) { - if W.WCleanup == nil { - return - } W.WCleanup(a0) } func (W _testing_TB) Error(args ...interface{}) { - if W.WError == nil { - return - } W.WError(args...) } func (W _testing_TB) Errorf(format string, args ...interface{}) { - if W.WErrorf == nil { - return - } W.WErrorf(format, args...) } func (W _testing_TB) Fail() { - if W.WFail == nil { - return - } W.WFail() } func (W _testing_TB) FailNow() { - if W.WFailNow == nil { - return - } W.WFailNow() } -func (W _testing_TB) Failed() (r0 bool) { - if W.WFailed == nil { - return - } +func (W _testing_TB) Failed() bool { return W.WFailed() } func (W _testing_TB) Fatal(args ...interface{}) { - if W.WFatal == nil { - return - } W.WFatal(args...) } func (W _testing_TB) Fatalf(format string, args ...interface{}) { - if W.WFatalf == nil { - return - } W.WFatalf(format, args...) } func (W _testing_TB) Helper() { - if W.WHelper == nil { - return - } W.WHelper() } func (W _testing_TB) Log(args ...interface{}) { - if W.WLog == nil { - return - } W.WLog(args...) } func (W _testing_TB) Logf(format string, args ...interface{}) { - if W.WLogf == nil { - return - } W.WLogf(format, args...) } -func (W _testing_TB) Name() (r0 string) { - if W.WName == nil { - return - } +func (W _testing_TB) Name() string { return W.WName() } func (W _testing_TB) Skip(args ...interface{}) { - if W.WSkip == nil { - return - } W.WSkip(args...) } func (W _testing_TB) SkipNow() { - if W.WSkipNow == nil { - return - } W.WSkipNow() } func (W _testing_TB) Skipf(format string, args ...interface{}) { - if W.WSkipf == nil { - return - } W.WSkipf(format, args...) } -func (W _testing_TB) Skipped() (r0 bool) { - if W.WSkipped == nil { - return - } +func (W _testing_TB) Skipped() bool { return W.WSkipped() } -func (W _testing_TB) TempDir() (r0 string) { - if W.WTempDir == nil { - return - } +func (W _testing_TB) TempDir() string { return W.WTempDir() } diff --git a/stdlib/text-template-parse.go b/stdlib/text-template-parse.go index 3518398..f6c0e0a 100644 --- a/stdlib/text-template-parse.go +++ b/stdlib/text-template-parse.go @@ -72,33 +72,24 @@ func init() { // _text_template_parse_Node is an interface wrapper for Node type type _text_template_parse_Node struct { IValue interface{} - WCopy func() (r0 parse.Node) - WPosition func() (r0 parse.Pos) - WString func() (r0 string) - WType func() (r0 parse.NodeType) + WCopy func() parse.Node + WPosition func() parse.Pos + WString func() string + WType func() parse.NodeType } -func (W _text_template_parse_Node) Copy() (r0 parse.Node) { - if W.WCopy == nil { - return - } +func (W _text_template_parse_Node) Copy() parse.Node { return W.WCopy() } -func (W _text_template_parse_Node) Position() (r0 parse.Pos) { - if W.WPosition == nil { - return - } +func (W _text_template_parse_Node) Position() parse.Pos { return W.WPosition() } -func (W _text_template_parse_Node) String() (r0 string) { +func (W _text_template_parse_Node) String() string { if W.WString == nil { - return + return "" } return W.WString() } -func (W _text_template_parse_Node) Type() (r0 parse.NodeType) { - if W.WType == nil { - return - } +func (W _text_template_parse_Node) Type() parse.NodeType { return W.WType() }