Golang Analytics SDK v0.1.0 released

We are happy to announce the first non-beta release of the Snowplow Golang Analytics SDK.

This analytics SDK provides Golang support for the transforming events to JSON (in equivalence with the other analytics SDKs), in addition to a method to transform events to map, and support for extracting individual fields and subsets of fields from an event without parsing the rest of the data.

This allows for extremely fast processing of Snowplow enriched data in real-time applications which run in a Golang environment.

API summary

Below is a quickstart summary of usage of the available API methods. For full documentation please visit our documentation site.

import "github.com/snowplow/snowplow-golang-analytics-sdk/analytics"

parsed, err := ParseEvent(event) // Where event is a valid TSV string Snowplow event.
if err != nil {
  fmt.Println(err)
}

parsed.ToJson() // whole event to JSON
parsed.ToMap() // whole event to map
parsed.GetValue("page_url") // get a value for a single canonical field
parsed.GetSubsetMap("page_url", "domain_userid", "contexts", "derived_contexts") // Get a map of values for a set of canonical fields
parsed.GetSubsetJson("page_url", "unstruct_event") // Get a JSON of values for a set of canonical fields
4 Likes