Adding depends to the table

This commit is contained in:
ngn 2024-01-17 20:54:37 +03:00
parent 5c669a7300
commit c447b632d9
3 changed files with 7 additions and 4 deletions

View File

@ -29,7 +29,7 @@ type Package struct {
Repo string
Desc string
Size string
Sum string
Deps string
URL string
Ver string
}
@ -61,11 +61,11 @@ func LoadPackgae(sec *ini.Section) (Package, error) {
}
pkg.Size = SizeFromBytes(size)
k, err = sec.GetKey("sum")
k, err = sec.GetKey("depends")
if err != nil {
return pkg, err
}
pkg.Sum = k.String()
pkg.Deps = k.String()
return pkg, nil
}

View File

@ -142,6 +142,7 @@ form select {
table {
margin-top: 20px;
border-collapse: collapse;
width: 100%;
}
table tr {

View File

@ -35,7 +35,8 @@
<th>Repo</th>
<th>Version</th>
<th>Size</th>
<th>Desc</th>
<th>Description</th>
<th>Dependencies</th>
</tr>
{{range .pkgs}}
<tr>
@ -44,6 +45,7 @@
<td>{{.Ver }}</td>
<td>{{.Size}}</td>
<td>{{.Desc}}</td>
<td>{{.Deps}}</td>
</tr>
{{end}}
</table>