Format code with gofmt

This commit fixes the style issues introduced in b199bf4 according to the output
from gofmt.

Details: https://deepsource.io/gh/0x6f736f646f/memfault-go/transform/d57180ee-b239-4651-82ce-815019166ae9/
This commit is contained in:
deepsource-autofix[bot]
2022-02-18 09:14:44 +00:00
committed by GitHub
parent b199bf4a64
commit a7fa28ca50
+32 -32
View File
@@ -1,44 +1,44 @@
package memfault
import (
"errors"
"fmt"
"os"
"testing"
"time"
"errors"
"fmt"
"os"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/assert"
)
var (
username = os.Getenv("MEMFAULT_USERNAME")
password = os.Getenv("MEMFAULT_PASSWORD")
username = os.Getenv("MEMFAULT_USERNAME")
password = os.Getenv("MEMFAULT_PASSWORD")
)
func TestCreateProject(t *testing.T) {
creds := Credentials{
Email: username,
Password: password,
}
d, _ := time.ParseDuration("30s")
conf := Config{
APIURL: "https://api.memfault.com",
Credentials: creds,
MaxIdleConns: 10,
IdleConnTimeout: d,
}
memfault := NewSDK(conf)
payload := Project{
Name: "SmartSdinkamakeabc",
Slug: "smartsdinkmskeabc",
Os: "FreeRTOS",
Platform: "nRF52",
}
response1, err := memfault.CreateProject(payload)
if err != nil {
fmt.Println(err)
}
fmt.Println(response1.Data.APIKey)
creds := Credentials{
Email: username,
Password: password,
}
d, _ := time.ParseDuration("30s")
conf := Config{
APIURL: "https://api.memfault.com",
Credentials: creds,
MaxIdleConns: 10,
IdleConnTimeout: d,
}
memfault := NewSDK(conf)
payload := Project{
Name: "SmartSdinkamakeabc",
Slug: "smartsdinkmskeabc",
Os: "FreeRTOS",
Platform: "nRF52",
}
response1, err := memfault.CreateProject(payload)
if err != nil {
fmt.Println(err)
}
fmt.Println(response1.Data.APIKey)
assert.Equal(t, err, errors.New("A project named `SmartSdinkamakeabc` already exists"), fmt.Sprintf("expected error %s, got nil", err))
assert.Equal(t, err, errors.New("A project named `SmartSdinkamakeabc` already exists"), fmt.Sprintf("expected error %s, got nil", err))
}