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