Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
Update example test
Browse files Browse the repository at this point in the history
  • Loading branch information
bmaupin committed Jun 6, 2016
1 parent db28736 commit 334e3ab
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,12 @@ func ExampleEpub_AddSection() {
func ExampleEpub_SetCover() {
e := epub.NewEpub("My title")

// Set the cover. The CSS path is optional
coverImagePath, _ := e.AddImage("testdata/gophercolor16x16.png", "cover.png")
e.SetCover(coverImagePath, "")
// Set the cover. The CSS content is optional
e.SetCover("testdata/gophercolor16x16.png", "")

// Update the cover using custom CSS
coverCSSContent := `h1 {
text-align: center;
}`
coverCSSPath, _ := e.AddCSS(coverCSSContent, "cover.css")
e.SetCover(coverImagePath, coverCSSPath)
e.SetCover("testdata/gophercolor16x16.png", coverCSSContent)
}

0 comments on commit 334e3ab

Please sign in to comment.