Skip to content

Commit 6e439db

Browse files
committed
Fix to tabbed indentation
1 parent d9c2bdb commit 6e439db

1 file changed

Lines changed: 40 additions & 40 deletions

File tree

testing/codegen/templates/http_harness.go.tpl

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -33,50 +33,50 @@ func (h *Harness) HTTPClient() *http.Client {
3333

3434
{{ printf "getHTTPClientImpl returns the underlying HTTP client implementation." | comment }}
3535
func (h *Harness) getHTTPClientImpl() *httpcli.Client {
36-
if h.httpSvr == nil || h.httpCli == nil {
37-
h.t.Fatal("HTTP transport not configured")
38-
}
39-
u, err := url.Parse(h.httpSvr.URL)
40-
if err != nil {
41-
h.t.Fatalf("invalid test server URL: %v", err)
42-
}
43-
scheme := u.Scheme
44-
host := u.Host
45-
{{- if .HasStreams }}
46-
// Create WebSocket dialer for streaming endpoints
47-
wsDialer := &websocket.Dialer{
48-
Proxy: http.ProxyFromEnvironment,
49-
}
50-
{{- end }}
51-
52-
return httpcli.NewClient(
53-
scheme,
54-
host,
55-
h.httpCli,
56-
goahttp.RequestEncoder,
57-
goahttp.ResponseDecoder,
58-
false,
59-
{{- if .HasStreams }}
60-
wsDialer,
61-
nil,
62-
{{- end }}
63-
)
36+
if h.httpSvr == nil || h.httpCli == nil {
37+
h.t.Fatal("HTTP transport not configured")
38+
}
39+
u, err := url.Parse(h.httpSvr.URL)
40+
if err != nil {
41+
h.t.Fatalf("invalid test server URL: %v", err)
42+
}
43+
scheme := u.Scheme
44+
host := u.Host
45+
{{- if .HasStreams }}
46+
// Create WebSocket dialer for streaming endpoints
47+
wsDialer := &websocket.Dialer{
48+
Proxy: http.ProxyFromEnvironment,
49+
}
50+
{{- end }}
51+
52+
return httpcli.NewClient(
53+
scheme,
54+
host,
55+
h.httpCli,
56+
goahttp.RequestEncoder,
57+
goahttp.ResponseDecoder,
58+
false,
59+
{{- if .HasStreams }}
60+
wsDialer,
61+
nil,
62+
{{- end }}
63+
)
6464
}
6565

6666
{{ printf "HTTPClientEndpoints creates HTTP client endpoints for the service." | comment }}
6767
func (h *Harness) HTTPClientEndpoints() *{{ .PkgName }}.Endpoints {
68-
c := h.getHTTPClientImpl()
69-
return &{{ .PkgName }}.Endpoints{
70-
{{- range .Methods }}
71-
{{- $method := . }}
72-
{{- range .Targets }}
73-
{{- if or .IsHTTPPlain .IsHTTPServerSent .IsHTTPWebSocket }}
74-
{{ $method.VarName }}: c.{{ $method.VarName }}(),
75-
{{- break }}
76-
{{- end }}
77-
{{- end }}
78-
{{- end }}
79-
}
68+
c := h.getHTTPClientImpl()
69+
return &{{ .PkgName }}.Endpoints{
70+
{{- range .Methods }}
71+
{{- $method := . }}
72+
{{- range .Targets }}
73+
{{- if or .IsHTTPPlain .IsHTTPServerSent .IsHTTPWebSocket }}
74+
{{ $method.VarName }}: c.{{ $method.VarName }}(),
75+
{{- break }}
76+
{{- end }}
77+
{{- end }}
78+
{{- end }}
79+
}
8080
}
8181

8282
{{ printf "HTTPURL returns the base URL of the test HTTP server." | comment }}

0 commit comments

Comments
 (0)