mirror of
https://github.com/ii64/gouring.git
synced 2025-02-18 03:16:28 +01:00
chore: example read-write memfd verify bytes
This commit is contained in:
parent
fe8ee1c7be
commit
cf008fa0a8
1 changed files with 5 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"reflect"
|
||||
"runtime"
|
||||
|
@ -96,6 +97,10 @@ func main() {
|
|||
case 0xaaaaaaaa:
|
||||
qRead()
|
||||
case 0xbbbbbbbb:
|
||||
// verify
|
||||
if !bytes.Equal(buf[:], rbuf) {
|
||||
panic("check failed")
|
||||
}
|
||||
qWrite()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue