Fix misspelled function name (#16236)

This commit is contained in:
John Tzikas
2020-11-09 11:32:21 +01:00
committed by GitHub
parent 45e340b5be
commit ed3ad65756
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ func (w *Web) InitStatic() {
func root(c *Context, w http.ResponseWriter, r *http.Request) {
if !CheckClientCompatability(r.UserAgent()) {
if !CheckClientCompatibility(r.UserAgent()) {
renderUnsupportedBrowser(c.App, w, r)
return
}
+1 -1
View File
@@ -50,7 +50,7 @@ var browserMinimumSupported = map[string]int{
"BrowserSafari": 12,
}
func CheckClientCompatability(agentString string) bool {
func CheckClientCompatibility(agentString string) bool {
ua := uasurfer.Parse(agentString)
if version, exist := browserMinimumSupported[ua.Browser.Name.String()]; exist && (ua.Browser.Version.Major < version || version < 0) {
+1 -1
View File
@@ -369,7 +369,7 @@ func TestCheckClientCompatability(t *testing.T) {
}
for _, browser := range uaTestParameters {
t.Run(browser.Name, func(t *testing.T) {
result := CheckClientCompatability(browser.UserAgent)
result := CheckClientCompatibility(browser.UserAgent)
require.Equalf(t, result, browser.Result, "user agent test failed for %s", browser.Name)
})
}