quran-go

Read Qur'an right in the terminal.
git clone http://git.hanabi.in/repos/quran-go.git
Log | Files | Refs | README | LICENSE

chapter-head.go (410B)


      1 package decorate
      2 
      3 import (
      4 	"fmt"
      5 
      6 	f "git.hanabi.in/gitbox/quran-go/src/fetch"
      7 	t "git.hanabi.in/gitbox/quran-go/src/types"
      8 )
      9 
     10 // Decorate Chapter Head like "Chapter 1 (Al-Fātiĥah)"
     11 func ChapterHead(chapterID t.Chap) (err error) {
     12 
     13 	chapDetails, err := f.ChapterDetails(chapterID)
     14 	if err != nil {
     15 		return err
     16 	}
     17 
     18 	fmt.Printf("\n\tChapter %d (%s)\n\n", chapDetails.ID, chapDetails.NameComplex)
     19 
     20 	return
     21 
     22 }