зеркало из https://github.com/mozilla/mig.git
Run gofmt
This commit is contained in:
Родитель
0bb216ac37
Коммит
8ee954597b
|
@ -13,12 +13,12 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
"log"
|
||||
|
||||
"github.com/mozilla/gozdef"
|
||||
"github.com/mozilla/mig"
|
||||
|
@ -102,7 +102,6 @@ func main() {
|
|||
log.Println(err)
|
||||
}
|
||||
|
||||
|
||||
buf, err := ioutil.ReadAll(os.Stdin)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
|
@ -272,7 +271,6 @@ func GetAuthToken(api ServiceApi) (string, error) {
|
|||
"audience": "%s"
|
||||
}`, api.ClientID, api.ClientSecret, api.URL))
|
||||
|
||||
|
||||
req, err := http.NewRequest("POST", api.AuthEndpoint, payload)
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
@ -306,7 +304,7 @@ func GetAuthToken(api ServiceApi) (string, error) {
|
|||
// query a ServiceAPI instance for the set of all assets
|
||||
// load them into a searchable map, keyed to asset hostname
|
||||
// the ServiceAPI object must already be loaded with a Bearer token
|
||||
func GetAssets(m map[string]ServiceApiAsset, api ServiceApi) (error){
|
||||
func GetAssets(m map[string]ServiceApiAsset, api ServiceApi) error {
|
||||
|
||||
// get json array of assets from serviceapi
|
||||
requestURL := api.URL + "api/v1/assets/"
|
||||
|
|
Загрузка…
Ссылка в новой задаче