search for: minimalconnect

Displaying 1 result from an estimated 1 matches for "minimalconnect".

2020 Apr 24
1
[PATCH nbdkit] golang: Pass Plugin and Connection by reference not value.
...:= 0; i < len(buf); i++ { buf[i] = 0 diff --git a/plugins/golang/examples/minimal/minimal.go b/plugins/golang/examples/minimal/minimal.go index e010bfcb..0f862889 100644 --- a/plugins/golang/examples/minimal/minimal.go +++ b/plugins/golang/examples/minimal/minimal.go @@ -50,15 +50,15 @@ type MinimalConnection struct { var size uint64 = 1024 * 1024 -func (p MinimalPlugin) Open(readonly bool) (nbdkit.ConnectionInterface, error) { +func (p *MinimalPlugin) Open(readonly bool) (nbdkit.ConnectionInterface, error) { return &MinimalConnection{}, nil } -func (c MinimalConnection) GetSize() (uint...