alienvault-otx / otx-go-sdk Goto Github PK
View Code? Open in Web Editor NEWA working client implementation for AlienVault OTX API written in Golang!
Home Page: https://otx.alienvault.com
License: Apache License 2.0
A working client implementation for AlienVault OTX API written in Golang!
Home Page: https://otx.alienvault.com
License: Apache License 2.0
fmt.PrintLns should only exist in main()
we need better string utils for manipulating the url query params.
its better for arbitrary stream decodes
if v != nil {
if w, ok := v.(io.Writer); ok {
io.Copy(w, resp.Body)
} else {
err = json.NewDecoder(resp.Body).Decode(v)
}
}
Because the code is nested under the src directory, you cannot use either of the following commands to download the library:
go get github.com/AlienVault-Labs/OTX-Go-SDK
gb vendor fetch github.com/AlienVault-Labs/OTX-Go-SDK
The code should be in the root of the project, the examples folder can remain the same
don't die like this:
/usr/local/Cellar/go/1.4.2/libexec/bin/go build -o "/private/var/folders/6_/0cj9yrxd0l76c60yh6mws2480000gn/T/otxapi (main)4go" -gcflags "-N -l" /Users/bsmartt/Dev/golang/go-otx-api-client/examples/main.go
"/Users/bsmartt/Library/Application Support/IntelliJIdea15/Go/lib/dlv/mac/dlv" --listen=localhost:59179 --headless=true exec "/private/var/folders/6_/0cj9yrxd0l76c60yh6mws2480000gn/T/otxapi (main)4go" --
/api/v1/user/ response status: 403
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x2c7d]
goroutine 1 [running]:
main.main()
/Users/bsmartt/Dev/golang/go-otx-api-client/examples/main.go:24 +0xc7d
goroutine 9 [runnable]:
net/http.(*persistConn).readLoop(0xc208074000otxapi.UserDetail{}
)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/transport.go:928 +0x9ce
created by net/http.(*Transport).dialConn
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/transport.go:660 +0xc9f
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/local/Cellar/go/1.4.2/libexec/src/runtime/asm_amd64.s:2232 +0x1
goroutine 10 [select]:
net/http.(*persistConn).writeLoop(0xc208074000)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/transport.go:945 +0x41d
created by net/http.(*Transport).dialConn
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/transport.go:661 +0xcbc
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.