barcodes/generation/codabar.go

17 lines
331 B
Go
Raw Normal View History

2023-09-01 20:50:47 +01:00
package generation
import (
"fmt"
"github.com/boombuler/barcode"
"github.com/boombuler/barcode/codabar"
)
func generateCodabar(parameters Parameters) (barcode.Barcode, error) {
2023-09-01 22:14:11 +01:00
codabarItem, err := codabar.Encode(parameters.Content)
2023-09-01 20:50:47 +01:00
if err != nil {
fmt.Println("Error creating Barcode", err)
}
2023-09-01 22:14:11 +01:00
return codabarItem, err
2023-09-01 20:50:47 +01:00
}