
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
github.com/go-test/deep
Advanced tools
This package provides a single function: deep.Equal. It's like reflect.DeepEqual but much friendlier to humans (or any sentient being) for two reason:
deep.Equal returns a list of differencesdeep.Equal does not compare unexported fields (by default)reflect.DeepEqual is good (like all things Golang!), but it's a game of Hunt the Wumpus. For large maps, slices, and structs, finding the difference is difficult.
deep.Equal doesn't play games with you, it lists the differences:
package main_test
import (
"testing"
"github.com/go-test/deep"
)
type T struct {
Name string
Numbers []float64
}
func TestDeepEqual(t *testing.T) {
// Can you spot the difference?
t1 := T{
Name: "Isabella",
Numbers: []float64{1.13459, 2.29343, 3.010100010},
}
t2 := T{
Name: "Isabella",
Numbers: []float64{1.13459, 2.29843, 3.010100010},
}
if diff := deep.Equal(t1, t2); diff != nil {
t.Error(diff)
}
}
$ go test
--- FAIL: TestDeepEqual (0.00s)
main_test.go:25: [Numbers.slice[1]: 2.29343 != 2.29843]
The difference is in Numbers.slice[1]: the two values aren't equal using Go ==.
FAQs
Unknown package
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.