Skip to content

Instantly share code, notes, and snippets.

const HandlerRunner = require("serverless-offline/dist/lambda/handler-runner/index").default;
class OfflineInvalidate {
constructor(serverless, options) {
this.serverless = serverless;
this.hooks = {
"before:offline:start:init": (opts) => this.inject()
};
this.lastRunner = {};
}
I:\development\plugin_test>gdb greeter.exe
Reading symbols from greeter.exe...done.
(gdb) b go.link.addmoduledata
Function "go.link.addmoduledata" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (_go.link.addmoduledata) pending.
(gdb) run
Starting program: I:\development\plugin_test\greeter.exe
Starting
/mnt/i/development/plugin_test$ gdb ./greeter_linux
Reading symbols from ./greeter_linux...done.
(gdb) b link.addmoduledata
Function "link.addmoduledata" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (link.addmoduledata) pending.
(gdb) display/i $pc
(gdb) b main.main
Breakpoint 2 at 0x51e1d0
(gdb) r
ERROR: 2016/03/22 14:06:52 image_util.go:23: EOF 0
ERROR: 2016/03/22 14:06:52 image_util.go:24: File read error occurred for c:\GoWork\src\github.com\cchamplin\goimage\test\catalog\product\1\0\1000083_3.jpg - read 0 bytes
ERROR: 2016/03/22 14:06:52 image_util.go:29: File info for c:\GoWork\src\github.com\cchamplin\goimage\test\catalog\product\1\0\1000083_3.jpg: Size: 81124 Mode: -rw-rw-rw-
ERROR: 2016/03/22 14:06:52 image_util.go:33: Second read failed c:\GoWork\src\github.com\cchamplin\goimage\test\catalog\product\1\0\1000083_3.jpg: EOF
ERROR: 2016/03/22 14:06:52 image_util.go:44: Third read succeeded for c:\GoWork\src\github.com\cchamplin\goimage\test\catalog\product\1\0\1000083_3.jpg 12
f, err := os.Open(path)
defer f.Close()
f, err := os.Open(path)
defer f.Close()
if err != nil {
log.Error.Printf("Failed to open file %s", path)
return "", err
}
byteData := make([]byte, 12)
bytesRead, err := f.Read(byteData)
f, err := os.Open(path)
defer f.Close()
if err != nil {
log.Error.Printf("Failed to open file %s", path)
return "", err
}
byteData := make([]byte, 12)
bytesRead, err := f.Read(byteData)