Refactor platform command api
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
package libbox
|
||||
|
||||
import C "github.com/sagernet/sing-box/constant"
|
||||
import (
|
||||
C "github.com/sagernet/sing-box/constant"
|
||||
|
||||
"github.com/dustin/go-humanize"
|
||||
)
|
||||
|
||||
func SetBasePath(path string) {
|
||||
C.SetBasePath(path)
|
||||
@@ -9,3 +13,7 @@ func SetBasePath(path string) {
|
||||
func Version() string {
|
||||
return C.Version
|
||||
}
|
||||
|
||||
func FormatBytes(length int64) string {
|
||||
return humanize.Bytes(uint64(length))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user