mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 11:37:01 -07:00
Fixed formatting via gofmt
Signed-off-by: David J. Allen <davidallendj@gmail.com>
This commit is contained in:
parent
ac9556a526
commit
b3368e5264
11 changed files with 94 additions and 103 deletions
|
|
@ -10,7 +10,6 @@ import (
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
var collectCmd = &cobra.Command{
|
var collectCmd = &cobra.Command{
|
||||||
Use: "collect",
|
Use: "collect",
|
||||||
Short: "Query information about BMC",
|
Short: "Query information about BMC",
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import (
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
var listCmd = &cobra.Command{
|
var listCmd = &cobra.Command{
|
||||||
Use: "list",
|
Use: "list",
|
||||||
Short: "List information from scan",
|
Short: "List information from scan",
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ var (
|
||||||
Port = 27779
|
Port = 27779
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
func makeEndpointUrl(endpoint string) string {
|
func makeEndpointUrl(endpoint string) string {
|
||||||
return Host + ":" + fmt.Sprint(Port) + BaseEndpoint + endpoint
|
return Host + ":" + fmt.Sprint(Port) + BaseEndpoint + endpoint
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
func MakeRequest(url string, httpMethod string, body []byte, headers map[string]string) (*http.Response, []byte, error) {
|
func MakeRequest(url string, httpMethod string, body []byte, headers map[string]string) (*http.Response, []byte, error) {
|
||||||
// url := getSmdEndpointUrl(endpoint)
|
// url := getSmdEndpointUrl(endpoint)
|
||||||
req, _ := http.NewRequest(httpMethod, url, bytes.NewBuffer(body))
|
req, _ := http.NewRequest(httpMethod, url, bytes.NewBuffer(body))
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,11 @@ import (
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
type Logger struct {
|
type Logger struct {
|
||||||
Log *logrus.Logger
|
Log *logrus.Logger
|
||||||
Path string
|
Path string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func NewLogger(l *logrus.Logger, level logrus.Level) *Logger {
|
func NewLogger(l *logrus.Logger, level logrus.Level) *Logger {
|
||||||
l.SetLevel(level)
|
l.SetLevel(level)
|
||||||
return &Logger{
|
return &Logger{
|
||||||
|
|
@ -19,8 +17,6 @@ func NewLogger(l *logrus.Logger, level logrus.Level) *Logger {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (l *Logger) WriteFile(path string) {
|
func (l *Logger) WriteFile(path string) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import (
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
func rawConnect(host string, ports []int, timeout int, keepOpenOnly bool) []BMCProbeResult {
|
func rawConnect(host string, ports []int, timeout int, keepOpenOnly bool) []BMCProbeResult {
|
||||||
results := []BMCProbeResult{}
|
results := []BMCProbeResult{}
|
||||||
for _, p := range ports {
|
for _, p := range ports {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue