gofmt -s do code format

Signed-off-by: spacexnice <yaoyao.xyy@alibaba-inc.com>
This commit is contained in:
spacexnice 2016-08-25 07:34:36 +08:00
parent ca2b78dc0a
commit 22cf89c02b
2 changed files with 5 additions and 6 deletions

View file

@ -49,9 +49,9 @@ func NewSimpleChallengeManager() ChallengeManager {
}
}
type simpleChallengeManager struct{
type simpleChallengeManager struct {
sync.RWMutex
Challanges map[string][]Challenge
Challanges map[string][]Challenge
}
func (m *simpleChallengeManager) GetChallenges(endpoint url.URL) ([]Challenge, error) {

View file

@ -5,8 +5,8 @@ import (
"net/http"
"net/url"
"strings"
"testing"
"sync"
"testing"
)
func TestAuthChallengeParse(t *testing.T) {
@ -82,7 +82,6 @@ func testAuthChallengeNormalization(t *testing.T, host string) {
}
}
func testAuthChallengeConcurrent(t *testing.T, host string) {
scm := NewSimpleChallengeManager()
@ -104,7 +103,7 @@ func testAuthChallengeConcurrent(t *testing.T, host string) {
s.Add(2)
go func() {
for i:=0 ; i<200; i++ {
for i := 0; i < 200; i++ {
err = scm.AddResponse(resp)
if err != nil {
t.Fatal(err)
@ -115,7 +114,7 @@ func testAuthChallengeConcurrent(t *testing.T, host string) {
go func() {
lowered := *url
lowered.Host = strings.ToLower(lowered.Host)
for k := 0; k < 200 ; k++ {
for k := 0; k < 200; k++ {
_, err := scm.GetChallenges(lowered)
if err != nil {
t.Fatal(err)