mirror of
https://github.com/gogs/gogs.git
synced 2025-05-31 11:42:13 +00:00
* Bootstrap with GORM * Fix lint error * Set conn max lifetime to one minute * Fallback to use gorm v1 * Define HTTP routes * Finish authentication * Save token updated * Add docstring * Finish authorization * serveBatch rundown * Define types in lfsutil * Finish Batch * authutil * Finish basic * Formalize response error * Fix lint errors * authutil: add tests * dbutil: add tests * lfsutil: add tests * strutil: add tests * Formalize 401 response
18 lines
411 B
Go
18 lines
411 B
Go
// Copyright 2020 The Gogs Authors. All rights reserved.
|
|
// Use of this source code is governed by a MIT-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package strutil
|
|
|
|
import (
|
|
"unicode"
|
|
)
|
|
|
|
// ToUpperFirst returns s with only the first Unicode letter mapped to its upper case.
|
|
func ToUpperFirst(s string) string {
|
|
for i, v := range s {
|
|
return string(unicode.ToUpper(v)) + s[i+1:]
|
|
}
|
|
return ""
|
|
}
|