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

View File

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

View File

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