migrate from com.* to alternatives (#14103)
* remove github.com/unknwon/com from models * dont use "com.ToStr()" * replace "com.ToStr" with "fmt.Sprint" where its easy to do * more refactor * fix test * just "proxy" Copy func for now * as per @lunny
This commit is contained in:
parent
04ae0f2f3f
commit
a19447aed1
46 changed files with 230 additions and 220 deletions
|
@ -26,7 +26,6 @@ import (
|
|||
|
||||
"github.com/dgrijalva/jwt-go"
|
||||
"github.com/kballard/go-shellquote"
|
||||
"github.com/unknwon/com"
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
|
@ -105,7 +104,10 @@ func runServ(c *cli.Context) error {
|
|||
if len(keys) != 2 || keys[0] != "key" {
|
||||
fail("Key ID format error", "Invalid key argument: %s", c.Args()[0])
|
||||
}
|
||||
keyID := com.StrTo(keys[1]).MustInt64()
|
||||
keyID, err := strconv.ParseInt(keys[1], 10, 64)
|
||||
if err != nil {
|
||||
fail("Key ID format error", "Invalid key argument: %s", c.Args()[1])
|
||||
}
|
||||
|
||||
cmd := os.Getenv("SSH_ORIGINAL_COMMAND")
|
||||
if len(cmd) == 0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue