Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
github.com/rp-3/gheap
heap := gheap.NewHeap(-1) // unbounded size
// add anything you want to the heap
type itemToHeapify struct {
// any properties you want
}
// so long as it conforms to the orderable interface, which looks like this:
type Orderable interface {
// Order dictates the internal ordering of the items in the heap. Heap is
// min-ordered, so lowest-order items have the highest priority
Order() int
}
// make your itemToHeapify conform to the interface by adding a method named
// `Order`, like this:
func (i itemToHeapify) Order int {
// Returns the relative order of this item as an int
}
// 1. make sure you're conforming to the protocol
type itemToHeapify struct {
key int
val []byte // use whatever you want
}
func (i itemToHeapify) Order int {
return i.key
}
// 2. create a heap
heap := gheap.NewHeap(-1) // unbounded size
// 3. Push and Pop at will
a, ok := heap.Push(itemToHeapify{ key: 1, val: []byte{} })
b, ok := heap.Pop()
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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.