fix parsing, fix new line

This commit is contained in:
2025-08-12 21:07:41 +02:00
parent 61eab24ba4
commit e025b06a12
2 changed files with 4 additions and 4 deletions

View File

@@ -42,7 +42,7 @@ func (p *CRC64Cmd) Execute(ctx context.Context, f *flag.FlagSet, args ...interfa
if len(p.table) > 0 {
param, err = parse(p.table)
if err != nil {
fmt.Printf("Available tables: IEEE Castagnoli Koopman")
fmt.Println("Available tables: ISO ECMA")
return subcommands.ExitFailure
}
}
@@ -71,9 +71,9 @@ func (p *CRC64Cmd) Execute(ctx context.Context, f *flag.FlagSet, args ...interfa
func parse(tableName string) (uint64, error) {
switch tableName {
case "Castagnoli":
case "ISO":
return crc64.ISO, nil
case "Koopman":
case "ECMA":
return crc64.ECMA, nil
}
return 0, fmt.Errorf("invalid table name: %s", tableName)