mirror of
https://gitea.com/gitea/tea.git
synced 2025-09-03 02:18:30 +02:00
refactor: improve code quality and efficiency in various files (#548)
- Replace loadConfig() with _ = loadConfig() - Update file permissions from 0660 to 0o660 - Simplify variable declarations - Replace golang.org/x/crypto/ssh/terminal with golang.org/x/term - Remove unused getCertPrincipals function - Replace time.Now().Sub() with time.Since() - Add test for ArgToIndex function Signed-off-by: appleboy <appleboy.tw@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-on: https://gitea.com/gitea/tea/pulls/548 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.io> Co-authored-by: appleboy <appleboy.tw@gmail.com> Co-committed-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
2
go.mod
2
go.mod
@ -18,6 +18,7 @@ require (
|
||||
github.com/stretchr/testify v1.7.0
|
||||
github.com/urfave/cli/v2 v2.16.3
|
||||
golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be
|
||||
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
)
|
||||
|
||||
@ -60,7 +61,6 @@ require (
|
||||
github.com/yuin/goldmark-emoji v1.0.1 // indirect
|
||||
golang.org/x/net v0.0.0-20220909164309-bea034e7d591 // indirect
|
||||
golang.org/x/sys v0.0.0-20220926163933-8cfa568d3c25 // indirect
|
||||
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
golang.org/x/tools v0.1.12 // indirect
|
||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||
|
Reference in New Issue
Block a user