Please use https://www.getpostman.com/collections/d164cacb143635aade85 as our collection and save it as
The content will be like this.
go get github.com/rbretecher/go-postman-collection
Read and parse
It will print
https://crudcrud.com/api/c5f5fac06b6c481e95caaaf5a2f57e42 as the result. We can take advantage of this for our automation API in Golang.
Create and save
It will generate a new postman_collection.json. The content will be like this.
Create auth and env
Auth can be added to a
Request or an
ItemGroup” and ”
Variable can be added to
URL“ — https://github.com/rbretecher/go-postman-collection.
auth := postman.CreateAuth(postman.Basic, postman.CreateAuthParam("username", "password"))
env := postman.CreateVariable("env", "prod")
The result will be like this.
Working with Postman and Golang? Why not combine both? — MperMperPisang