mirror of
https://github.com/adnanh/webhook.git
synced 2025-05-12 08:34:43 +00:00
bug: fix slice init length
Signed-off-by: yuhangcangqian <cuibuwei@qq.com>
This commit is contained in:
parent
b6f24d00a5
commit
0d5b29396a
1 changed files with 2 additions and 2 deletions
4
tls.go
4
tls.go
|
@ -53,7 +53,7 @@ func getTLSCipherSuites(v string) []uint16 {
|
|||
supported := tls.CipherSuites()
|
||||
|
||||
if v == "" {
|
||||
suites := make([]uint16, len(supported))
|
||||
suites := make([]uint16, 0, len(supported))
|
||||
|
||||
for _, cs := range supported {
|
||||
suites = append(suites, cs.ID)
|
||||
|
@ -64,7 +64,7 @@ func getTLSCipherSuites(v string) []uint16 {
|
|||
|
||||
var found bool
|
||||
txts := strings.Split(v, ",")
|
||||
suites := make([]uint16, len(txts))
|
||||
suites := make([]uint16, 0, len(txts))
|
||||
|
||||
for _, want := range txts {
|
||||
found = false
|
||||
|
|
Loading…
Add table
Reference in a new issue