add more help text

This commit is contained in:
filifa
2025-09-17 21:02:05 -04:00
parent 4b4858c54f
commit 9e6f648f0b
14 changed files with 126 additions and 42 deletions

View File

@@ -99,10 +99,18 @@ func shoelace(cmd *cobra.Command, args []string) {
// shoelaceCmd represents the shoelace command
var shoelaceCmd = &cobra.Command{
Use: "shoelace",
Use: "shoelace -f FILE",
Short: "Compute the area of a simple polygon from the vertex coordinates",
Long: `Compute the area of a simple polygon from the vertex coordinates.`,
Run: shoelace,
Long: `Compute the area of a simple polygon from the vertex coordinates.
Put each point on its own line, with each coordinate separated by whitespace. For example, a file with
1 6
3 1
7 2
4 4
8 5
will output an area of 16.5.`,
Run: shoelace,
}
func init() {