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/esonhugh/sculptor
Sculptor is a flexible and powerful Go library for transforming data from various formats (CSV, JSON, etc.) into desired Go struct types.
It is designed to significantly simplify and accelerate the process of data ingestion and formatting.
go get github.com/esonhugh/sculptor
package main
import (
"github.com/esonhugh/sculptor"
"log"
)
type TestStruct struct {
Name string `select:"name"`
Pass string `select:"pass"`
}
func main() {
Doc := sculptor.NewDataSculptor("test.json").
SetDocType(sculptor.JSON_DOCUMENT).
SetQuery("name", "user").
SetQuery("pass", "pass").
SetTargetStruct(&TestStruct{})
Doc.Do() // not block.
go func() {
Doc.Wait() // let process complete and close chan
// Doc.Wg.Wait() // is real Doc.Wait() do.
Doc.Close() // Same as close(Doc.ConstructedOutput)
}()
for i := range Doc.ConstructedOutput {
log.Print(i)
}
}
Checkout the test folder to see more examples.
godoc: https://pkg.go.dev/github.com/esonhugh/sculptor
welcome contributions! Free for fork and Pull Request.
sculptor is licensed under the MIT License. See LICENSE for more details.
Made with :heart: by Esonhugh
Inspired by AkaAny/gormja_core2
Inspired by Trickest
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.