assay.it is the service to confirm quality and eliminate production risks in Serverless, Microservices and other applications. assay-it/sdk-go
is the official SDK for the Go programming language.
Use this SDK to develop pure functional and typesafe Behavior as a Code to validate applications. assay.it automates the validation process along CI/CD pipelines. Continuous proofs of the quality helps to eliminate defects at earlier phases of loosely coupled topologies such as serverless applications, microservices and other systems that rely on interface syntaxes and its behaviors.
Use go get
to retrieve the SDK to add it to your GOPATH
workspace.
go get github.com/assay-it/sdk-go
Use go get -u
to update SDK with latest version
go get -u github.com/assay-it/sdk-go
This example shows a minimal Behavior as a Code suite, which pings the website and ensures the response is correct.
package main
import (
"github.com/assay-it/sdk-go/assay"
"github.com/assay-it/sdk-go/http"
ƒ "github.com/assay-it/sdk-go/http/recv"
ø "github.com/assay-it/sdk-go/http/send"
)
func TestOk() assay.Arrow {
return http.Join(
ø.GET("https://assay.it"),
ƒ.Code(http.StatusOK),
ƒ.Header("Content-Type").Is("text/html"),
)
}
func main() {
cat := assay.IO(
http.Default(),
assay.Logging(assay.LogLevelDebug),
)
TestOk()(cat)
}
Minimal example - an annotated walk-through and a minimal Behavior as a Code suite. Use it as getting started tutorial.
Advanced example - an annotated walk-through about CI/CD workflows, shows advanced usage of Behavior as a Code paradigm.
Developer Guide - The documentation is a general introduction on how to configure and use the SDK.
SDK is MIT licensed and accepts contributions via GitHub pull requests:
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
If you experience any issues with SDK, please let us know via GitHub issues. We appreciate detailed and accurate reports that help us to identity and replicate the issue.