Skip to content

Commit

Permalink
Merge pull request #22 from slobdell/fix_readme
Browse files Browse the repository at this point in the history
Fix README so that copy pasted works
  • Loading branch information
angelodlfrtr authored Oct 8, 2023
2 parents 1b75e22 + 7e2e897 commit 0381ef3
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,14 @@ func TestNew(t *testing.T) {
doc.SetDate("02/03/2021")
doc.SetPaymentTerm("02/04/2021")

logoBytes, _ := ioutil.ReadFile("./example_logo.png")
logoBytes, err := ioutil.ReadFile("./example_logo.png")
if err != nil {
log.Fatal(err)
}

doc.SetCompany(&generator.Contact{
Name: "Test Company",
Logo: &logoBytes,
Logo: logoBytes,
Address: &generator.Address{
Address: "89 Rue de Brest",
Address2: "Appartement 2",
Expand All @@ -84,7 +87,7 @@ func TestNew(t *testing.T) {
Description: "Cupcake ipsum dolor sit amet bonbon, Cupcake ipsum dolor sit amet bonbon, Cupcake ipsum dolor sit amet bonbon",
UnitCost: "99876.89",
Quantity: "2",
Tax: &Tax{
Tax: &generator.Tax{
Percent: "20",
},
})
Expand All @@ -94,10 +97,10 @@ func TestNew(t *testing.T) {
Name: "Test",
UnitCost: "99876.89",
Quantity: "2",
Tax: &Tax{
Tax: &generator.Tax{
Amount: "89",
},
Discount: &Discount{
Discount: &generator.Discount{
Percent: "30",
},
})
Expand All @@ -106,7 +109,7 @@ func TestNew(t *testing.T) {
Name: "Test",
UnitCost: "3576.89",
Quantity: "2",
Discount: &Discount{
Discount: &generator.Discount{
Percent: "50",
},
})
Expand All @@ -115,7 +118,7 @@ func TestNew(t *testing.T) {
Name: "Test",
UnitCost: "889.89",
Quantity: "2",
Discount: &Discount{
Discount: &generator.Discount{
Amount: "234.67",
},
})
Expand Down

0 comments on commit 0381ef3

Please sign in to comment.