mirror of https://github.com/perkeep/perkeep.git
Update go. Fix struct tags.
Change-Id: I08d05144dbd4c4a50474d05f1f4ecea67c3424e4
This commit is contained in:
parent
15057eec02
commit
96cedf05db
|
@ -1 +1 @@
|
||||||
6g version release.r58 8944
|
6g version release.r58 8946
|
||||||
|
|
|
@ -71,7 +71,7 @@ func TestSum32(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
type Foo struct {
|
type Foo struct {
|
||||||
B *BlobRef "foo"
|
B *BlobRef `json:"foo"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestJsonUnmarshal(t *testing.T) {
|
func TestJsonUnmarshal(t *testing.T) {
|
||||||
|
|
|
@ -51,50 +51,50 @@ type Superset struct {
|
||||||
BlobRef *blobref.BlobRef // Not in JSON, but included for
|
BlobRef *blobref.BlobRef // Not in JSON, but included for
|
||||||
// those who want to set it.
|
// those who want to set it.
|
||||||
|
|
||||||
Version int "camliVersion"
|
Version int `json:"camliVersion"`
|
||||||
Type string "camliType"
|
Type string `json:"camliType"`
|
||||||
|
|
||||||
Signer string "camliSigner"
|
Signer string `json:"camliSigner"`
|
||||||
Sig string "camliSig"
|
Sig string `json:"camliSig"`
|
||||||
|
|
||||||
ClaimType string "claimType"
|
ClaimType string `json:"claimType"`
|
||||||
ClaimDate string "claimDate"
|
ClaimDate string `json:"claimDate"`
|
||||||
|
|
||||||
Permanode string "permaNode"
|
Permanode string `json:"permaNode"`
|
||||||
Attribute string "attribute"
|
Attribute string `json:"attribute"`
|
||||||
Value string "value"
|
Value string `json:"value"`
|
||||||
|
|
||||||
// TODO: ditch both the FooBytes variants below. a string doesn't have to be UTF-8.
|
// TODO: ditch both the FooBytes variants below. a string doesn't have to be UTF-8.
|
||||||
|
|
||||||
FileName string "fileName"
|
FileName string `json:"fileName"`
|
||||||
FileNameBytes []interface{} "fileNameBytes" // TODO: needs custom UnmarshalJSON?
|
FileNameBytes []interface{} `json:"fileNameBytes"` // TODO: needs custom UnmarshalJSON?
|
||||||
|
|
||||||
SymlinkTarget string "symlinkTarget"
|
SymlinkTarget string `json:"symlinkTarget"`
|
||||||
SymlinkTargetBytes []interface{} "symlinkTargetBytes" // TODO: needs custom UnmarshalJSON?
|
SymlinkTargetBytes []interface{} `json:"symlinkTargetBytes"` // TODO: needs custom UnmarshalJSON?
|
||||||
|
|
||||||
UnixPermission string "unixPermission"
|
UnixPermission string `json:"unixPermission"`
|
||||||
UnixOwnerId int "unixOwnerId"
|
UnixOwnerId int `json:"unixOwnerId"`
|
||||||
UnixOwner string "unixOwner"
|
UnixOwner string `json:"unixOwner"`
|
||||||
UnixGroupId int "unixGroupId"
|
UnixGroupId int `json:"unixGroupId"`
|
||||||
UnixGroup string "unixGroup"
|
UnixGroup string `json:"unixGroup"`
|
||||||
UnixMtime string "unixMtime"
|
UnixMtime string `json:"unixMtime"`
|
||||||
UnixCtime string "unixCtime"
|
UnixCtime string `json:"unixCtime"`
|
||||||
UnixAtime string "unixAtime"
|
UnixAtime string `json:"unixAtime"`
|
||||||
|
|
||||||
Size uint64 "size" // for files
|
Size uint64 `json:"size"` // for files
|
||||||
ContentParts []*ContentPart "contentParts"
|
ContentParts []*ContentPart `json:"contentParts"`
|
||||||
Fragment bool "fragment"
|
Fragment bool `json:"fragment"`
|
||||||
|
|
||||||
Entries string "entries" // for directories, a blobref to a static-set
|
Entries string `json:"entries"` // for directories, a blobref to a static-set
|
||||||
Members []string "members" // for static sets (for directory static-sets:
|
Members []string `json:"members"` // for static sets (for directory static-sets:
|
||||||
// blobrefs to child dirs/files)
|
// blobrefs to child dirs/files)
|
||||||
}
|
}
|
||||||
|
|
||||||
type ContentPart struct {
|
type ContentPart struct {
|
||||||
BlobRef *blobref.BlobRef "blobRef"
|
BlobRef *blobref.BlobRef `json:"blobRef"`
|
||||||
SubBlobRef *blobref.BlobRef "subFileBlobRef"
|
SubBlobRef *blobref.BlobRef `json:"subFileBlobRef"`
|
||||||
Size uint64 "size"
|
Size uint64 `json:"size"`
|
||||||
Offset uint64 "offset"
|
Offset uint64 `json:"offset"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func stringFromMixedArray(parts []interface{}) string {
|
func stringFromMixedArray(parts []interface{}) string {
|
||||||
|
|
Loading…
Reference in New Issue