Skip to content

Commit 7968349

Browse files
authored
go server - use tabs instead of spaces (#14740)
1 parent 612dc4d commit 7968349

4 files changed

Lines changed: 20 additions & 20 deletions

File tree

modules/openapi-generator/src/main/resources/go-server/routers.mustache

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ func EncodeJSONResponse(i interface{}, status *int,{{#addResponseHeaders}} heade
108108
w.WriteHeader(http.StatusOK)
109109
}
110110

111-
if i != nil {
112-
return json.NewEncoder(w).Encode(i)
113-
}
111+
if i != nil {
112+
return json.NewEncoder(w).Encode(i)
113+
}
114114

115-
return nil
115+
return nil
116116
}
117117

118118
// ReadFormFileToTempFile reads file data from a request form and writes it to a temporary file
@@ -266,4 +266,4 @@ func parseInt32ArrayParameter(param, delim string, required bool) ([]int32, erro
266266
}
267267

268268
return ints, nil
269-
}
269+
}

samples/server/petstore/go-api-server/go/routers.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ func EncodeJSONResponse(i interface{}, status *int, headers map[string][]string,
7676
w.WriteHeader(http.StatusOK)
7777
}
7878

79-
if i != nil {
80-
return json.NewEncoder(w).Encode(i)
81-
}
79+
if i != nil {
80+
return json.NewEncoder(w).Encode(i)
81+
}
8282

83-
return nil
83+
return nil
8484
}
8585

8686
// ReadFormFileToTempFile reads file data from a request form and writes it to a temporary file
@@ -234,4 +234,4 @@ func parseInt32ArrayParameter(param, delim string, required bool) ([]int32, erro
234234
}
235235

236236
return ints, nil
237-
}
237+
}

samples/server/petstore/go-chi-server/go/routers.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ func EncodeJSONResponse(i interface{}, status *int, headers map[string][]string,
7272
w.WriteHeader(http.StatusOK)
7373
}
7474

75-
if i != nil {
76-
return json.NewEncoder(w).Encode(i)
77-
}
75+
if i != nil {
76+
return json.NewEncoder(w).Encode(i)
77+
}
7878

79-
return nil
79+
return nil
8080
}
8181

8282
// ReadFormFileToTempFile reads file data from a request form and writes it to a temporary file
@@ -230,4 +230,4 @@ func parseInt32ArrayParameter(param, delim string, required bool) ([]int32, erro
230230
}
231231

232232
return ints, nil
233-
}
233+
}

samples/server/petstore/go-server-required/go/routers.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ func EncodeJSONResponse(i interface{}, status *int, headers map[string][]string,
7272
w.WriteHeader(http.StatusOK)
7373
}
7474

75-
if i != nil {
76-
return json.NewEncoder(w).Encode(i)
77-
}
75+
if i != nil {
76+
return json.NewEncoder(w).Encode(i)
77+
}
7878

79-
return nil
79+
return nil
8080
}
8181

8282
// ReadFormFileToTempFile reads file data from a request form and writes it to a temporary file
@@ -230,4 +230,4 @@ func parseInt32ArrayParameter(param, delim string, required bool) ([]int32, erro
230230
}
231231

232232
return ints, nil
233-
}
233+
}

0 commit comments

Comments
 (0)