github.com/daeMOn63/bitclient@v0.0.0-20190425080230-bfee94efac35/bitclient.go (about)

     1  package bitclient
     2  
     3  import (
     4  	"github.com/dghubble/sling"
     5  )
     6  
     7  type BitClient struct {
     8  	sling *sling.Sling
     9  }
    10  
    11  func NewBitClient(url string, username string, password string) *BitClient {
    12  
    13  	return &BitClient{
    14  		sling: sling.New().Base(url).Set("Accept", "application/json").SetBasicAuth(username, password),
    15  	}
    16  }