Skip to content

Instantly share code, notes, and snippets.

View mvo5's full-sized avatar

Michael Vogt mvo5

View GitHub Profile
@mvo5
mvo5 / weird.go
Last active March 15, 2023 08:37
Go can have weird behavior for nil - this illustrates one pitfal.
package main
import (
"fmt"
"os"
)
func foo() error {
err := &os.SyscallError{}
err = nil
@mvo5
mvo5 / findininitrd.go
Last active April 21, 2020 08:51
Find needle in a ubuntu initrd (that is concated from multiple initrds)
package main
import (
"bufio"
"bytes"
"fmt"
"io"
"os"
"github.com/kjk/lzma"