forked from External/ergo
move password handling into a single file
This commit is contained in:
parent
b421971b61
commit
9aa7debbfe
4 changed files with 45 additions and 20 deletions
|
|
@ -1,7 +1,6 @@
|
|||
package irc
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"log"
|
||||
"os"
|
||||
|
|
@ -9,10 +8,7 @@ import (
|
|||
)
|
||||
|
||||
func decodePassword(password string) []byte {
|
||||
if password == "" {
|
||||
return nil
|
||||
}
|
||||
bytes, err := base64.StdEncoding.DecodeString(password)
|
||||
bytes, err := DecodePassword(password)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue