FAQ
Hi,

Just change to this:

         func loadPage(filename, title string) (*Page, error) {
           body, err := ioutil.ReadFile(filename + ".html")
           if err != nil{
            return nil, err
           }
           return &Page{Title: title, Body: body}, nil
         }

I think that will do the trick :-)

C

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedAug 25, '14 at 12:01a
activeAug 26, '14 at 4:18a
posts2
users2
websitegolang.org

2 users in discussion

Craig Mason-Jones: 1 post Theirf: 1 post

People

Translate

site design / logo © 2021 Grokbase