mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-26 13:01:59 -08:00
remove whitespace from hashBuf (#3622)
Some checks failed
code_lint / golangci_lint (push) Has been cancelled
code_lint / mod_tidy (push) Has been cancelled
code_lint / api_docs (push) Has been cancelled
code_test / test_64 (push) Has been cancelled
code_test / test_32 (push) Has been cancelled
code_test / test_highlevel (push) Has been cancelled
Some checks failed
code_lint / golangci_lint (push) Has been cancelled
code_lint / mod_tidy (push) Has been cancelled
code_lint / api_docs (push) Has been cancelled
code_test / test_64 (push) Has been cancelled
code_test / test_32 (push) Has been cancelled
code_test / test_highlevel (push) Has been cancelled
* remove whitespace from hashBuf * merge bytes.TrimSpace and strings.TrimSpace --------- Co-authored-by: aler9 <46489434+aler9@users.noreply.github.com>
This commit is contained in:
parent
6225706c82
commit
c8f1fa93f5
1 changed files with 4 additions and 2 deletions
|
|
@ -44,9 +44,11 @@ func do() error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
hash := make([]byte, hex.DecodedLen(len(hashBuf)))
|
||||
|
||||
if _, err = hex.Decode(hash, bytes.TrimSpace(hashBuf)); err != nil {
|
||||
str := strings.TrimSpace(string(hashBuf))
|
||||
|
||||
hash, err := hex.DecodeString(str)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue