Skip to content

Commit 2a4400c

Browse files
authored
Add license info to package data (#1176)
1 parent 82eb630 commit 2a4400c

File tree

4 files changed

+139
-123
lines changed

4 files changed

+139
-123
lines changed

pkg/rpc/convert.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ func ConvertToRPCPkgs(pkgs []ftypes.Package) []*common.Package {
3131
SrcVersion: pkg.SrcVersion,
3232
SrcRelease: pkg.SrcRelease,
3333
SrcEpoch: int32(pkg.SrcEpoch),
34+
License: pkg.License,
3435
})
3536
}
3637
return rpcPkgs
@@ -50,6 +51,7 @@ func ConvertFromRPCPkgs(rpcPkgs []*common.Package) []ftypes.Package {
5051
SrcVersion: pkg.SrcVersion,
5152
SrcRelease: pkg.SrcRelease,
5253
SrcEpoch: int(pkg.SrcEpoch),
54+
License: pkg.License,
5355
})
5456
}
5557
return pkgs

pkg/rpc/convert_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ func TestConvertToRpcPkgs(t *testing.T) {
4040
SrcVersion: "1.2.3",
4141
SrcRelease: "1",
4242
SrcEpoch: 2,
43+
License: "MIT",
4344
},
4445
},
4546
},
@@ -54,6 +55,7 @@ func TestConvertToRpcPkgs(t *testing.T) {
5455
SrcVersion: "1.2.3",
5556
SrcRelease: "1",
5657
SrcEpoch: 2,
58+
License: "MIT",
5759
},
5860
},
5961
},
@@ -88,6 +90,7 @@ func TestConvertFromRpcPkgs(t *testing.T) {
8890
SrcVersion: "1.2.3",
8991
SrcRelease: "1",
9092
SrcEpoch: 2,
93+
License: "MIT",
9194
},
9295
},
9396
},
@@ -102,6 +105,7 @@ func TestConvertFromRpcPkgs(t *testing.T) {
102105
SrcVersion: "1.2.3",
103106
SrcRelease: "1",
104107
SrcEpoch: 2,
108+
License: "MIT",
105109
},
106110
},
107111
},

0 commit comments

Comments
 (0)