Merge pull request #2284 from ollama/mxyng/parse-raw

remove unnecessary parse raw
This commit is contained in:
Michael Yang 2024-01-31 09:40:48 -08:00 committed by GitHub
commit 60f47be64c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -147,12 +147,7 @@ func (s SignatureData) Bytes() []byte {
// SignData takes a SignatureData object and signs it with a raw private key
func (s SignatureData) Sign(rawKey []byte) (string, error) {
privateKey, err := ssh.ParseRawPrivateKey(rawKey)
if err != nil {
return "", err
}
signer, err := ssh.NewSignerFromKey(privateKey)
signer, err := ssh.ParsePrivateKey(rawKey)
if err != nil {
return "", err
}