remove status type

This commit is contained in:
Patricio Whittingslow
2026-07-26 13:43:31 -03:00
parent cc7ecc0c19
commit dd7c4bb037
3 changed files with 67 additions and 206 deletions
+1 -142
View File
@@ -1,4 +1,4 @@
// Code generated by "stringer -type Method,status -linecomment -output stringers.go"; DO NOT EDIT.
// Code generated by "stringer -type Method -linecomment -output stringers.go"; DO NOT EDIT.
package httphi
@@ -32,144 +32,3 @@ func (i Method) String() string {
}
return _Method_name[_Method_index[idx]:_Method_index[idx+1]]
}
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[StatusContinue-100]
_ = x[StatusSwitchingProtocols-101]
_ = x[StatusProcessing-102]
_ = x[StatusEarlyHints-103]
_ = x[StatusOK-200]
_ = x[StatusCreated-201]
_ = x[StatusAccepted-202]
_ = x[StatusNonAuthoritativeInfo-203]
_ = x[StatusNoContent-204]
_ = x[StatusResetContent-205]
_ = x[StatusPartialContent-206]
_ = x[StatusMultiStatus-207]
_ = x[StatusAlreadyReported-208]
_ = x[StatusIMUsed-226]
_ = x[StatusMultipleChoices-300]
_ = x[StatusMovedPermanently-301]
_ = x[StatusFound-302]
_ = x[StatusSeeOther-303]
_ = x[StatusNotModified-304]
_ = x[StatusUseProxy-305]
_ = x[StatusTemporaryRedirect-307]
_ = x[StatusPermanentRedirect-308]
_ = x[StatusBadRequest-400]
_ = x[StatusUnauthorized-401]
_ = x[StatusPaymentRequired-402]
_ = x[StatusForbidden-403]
_ = x[StatusNotFound-404]
_ = x[StatusMethodNotAllowed-405]
_ = x[StatusNotAcceptable-406]
_ = x[StatusProxyAuthRequired-407]
_ = x[StatusRequestTimeout-408]
_ = x[StatusConflict-409]
_ = x[StatusGone-410]
_ = x[StatusLengthRequired-411]
_ = x[StatusPreconditionFailed-412]
_ = x[StatusRequestEntityTooLarge-413]
_ = x[StatusRequestURITooLong-414]
_ = x[StatusUnsupportedMediaType-415]
_ = x[StatusRequestedRangeNotSatisfiable-416]
_ = x[StatusExpectationFailed-417]
_ = x[StatusTeapot-418]
_ = x[StatusMisdirectedRequest-421]
_ = x[StatusUnprocessableEntity-422]
_ = x[StatusLocked-423]
_ = x[StatusFailedDependency-424]
_ = x[StatusTooEarly-425]
_ = x[StatusUpgradeRequired-426]
_ = x[StatusPreconditionRequired-428]
_ = x[StatusTooManyRequests-429]
_ = x[StatusRequestHeaderFieldsTooLarge-431]
_ = x[StatusUnavailableForLegalReasons-451]
_ = x[StatusInternalServerError-500]
_ = x[StatusNotImplemented-501]
_ = x[StatusBadGateway-502]
_ = x[StatusServiceUnavailable-503]
_ = x[StatusGatewayTimeout-504]
_ = x[StatusHTTPVersionNotSupported-505]
_ = x[StatusVariantAlsoNegotiates-506]
_ = x[StatusInsufficientStorage-507]
_ = x[StatusLoopDetected-508]
_ = x[StatusNotExtended-510]
_ = x[StatusNetworkAuthenticationRequired-511]
}
const _status_name = "ContinueSwitching ProtocolsProcessingEarly HintsOKCreatedAcceptedNon-Authoritative InformationNo ContentReset ContentPartial ContentMulti-StatusAlready ReportedIM UsedMultiple ChoicesMoved PermanentlyFoundSee OtherNot ModifiedUse ProxyTemporary RedirectPermanent RedirectBad RequestUnauthorizedPayment RequiredForbiddenNot FoundMethod Not AllowedNot AcceptableProxy Authentication RequiredRequest TimeoutConflictGoneLength RequiredPrecondition FailedRequest Entity Too LargeRequest URI Too LongUnsupported Media TypeRequested Range Not SatisfiableExpectation FailedI'm a teapotMisdirected RequestUnprocessable EntityLockedFailed DependencyToo EarlyUpgrade RequiredPrecondition RequiredToo Many RequestsRequest Header Fields Too LargeUnavailable For Legal ReasonsInternal Server ErrorNot ImplementedBad GatewayService UnavailableGateway TimeoutHTTP Version Not SupportedVariant Also NegotiatesInsufficient StorageLoop DetectedNot ExtendedNetwork Authentication Required"
var _status_map = map[status]string{
100: _status_name[0:8],
101: _status_name[8:27],
102: _status_name[27:37],
103: _status_name[37:48],
200: _status_name[48:50],
201: _status_name[50:57],
202: _status_name[57:65],
203: _status_name[65:94],
204: _status_name[94:104],
205: _status_name[104:117],
206: _status_name[117:132],
207: _status_name[132:144],
208: _status_name[144:160],
226: _status_name[160:167],
300: _status_name[167:183],
301: _status_name[183:200],
302: _status_name[200:205],
303: _status_name[205:214],
304: _status_name[214:226],
305: _status_name[226:235],
307: _status_name[235:253],
308: _status_name[253:271],
400: _status_name[271:282],
401: _status_name[282:294],
402: _status_name[294:310],
403: _status_name[310:319],
404: _status_name[319:328],
405: _status_name[328:346],
406: _status_name[346:360],
407: _status_name[360:389],
408: _status_name[389:404],
409: _status_name[404:412],
410: _status_name[412:416],
411: _status_name[416:431],
412: _status_name[431:450],
413: _status_name[450:474],
414: _status_name[474:494],
415: _status_name[494:516],
416: _status_name[516:547],
417: _status_name[547:565],
418: _status_name[565:577],
421: _status_name[577:596],
422: _status_name[596:616],
423: _status_name[616:622],
424: _status_name[622:639],
425: _status_name[639:648],
426: _status_name[648:664],
428: _status_name[664:685],
429: _status_name[685:702],
431: _status_name[702:733],
451: _status_name[733:762],
500: _status_name[762:783],
501: _status_name[783:798],
502: _status_name[798:809],
503: _status_name[809:828],
504: _status_name[828:843],
505: _status_name[843:869],
506: _status_name[869:892],
507: _status_name[892:912],
508: _status_name[912:925],
510: _status_name[925:937],
511: _status_name[937:968],
}
func (i status) String() string {
if str, ok := _status_map[i]; ok {
return str
}
return "status(" + strconv.FormatInt(int64(i), 10) + ")"
}