mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-03-26 02:25:37 +08:00
阶段性提交
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package shared
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
type SizeCapacityUnit = string
|
||||
|
||||
const (
|
||||
@@ -28,3 +30,7 @@ func (this *SizeCapacity) Bytes() int64 {
|
||||
return this.Count
|
||||
}
|
||||
}
|
||||
|
||||
func (this *SizeCapacity) AsJSON() ([]byte, error) {
|
||||
return json.Marshal(this)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user