master v2.1.0.beta.12
兔子 2 months ago
parent 4fd9c37944
commit ff8a3470c7

@ -52,7 +52,7 @@ func init() {
}
func parseSpeedString(speedString string) (uint64, error) {
// 定义单位及其对应的字节值
unitMultipliers := map[string]int{
unitMultipliers := map[string]int64{
"b": 1, "": 1,
"k": 1024, "kb": 1024, "kib": 1024,
"m": 1024 * 1024, "mb": 1024 * 1024, "mib": 1024 * 1024,

@ -106,7 +106,7 @@ func (k *KeyGen) Gen() error {
return err
}
var block *pem.Block
if k.Encrypt != "" {
if k.Encrypt == "" {
block, err = ssh.MarshalPrivateKey(priv, "")
} else {
block, err = ssh.MarshalPrivateKeyWithPassphrase(priv, "", []byte(k.Encrypt))

@ -42,7 +42,7 @@ import (
var cmdRoot = &cobra.Command{
Use: "b612",
Version: "2.1.0.beta.11",
Version: "2.1.0.beta.12",
}
func init() {

@ -42,7 +42,7 @@ func init() {
func parseSpeedString(speedString string) (uint64, error) {
// 定义单位及其对应的字节值
unitMultipliers := map[string]int{
unitMultipliers := map[string]int64{
"b": 1, "": 1,
"k": 1024, "kb": 1024, "kib": 1024,
"m": 1024 * 1024, "mb": 1024 * 1024, "mib": 1024 * 1024,

Loading…
Cancel
Save