Re-enable error handling for Trello
This commit is contained in:
parent
9dd8169a02
commit
35fd34ddd0
1 changed files with 10 additions and 5 deletions
|
@ -1,12 +1,11 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
// "errors"
|
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/adlio/trello"
|
"github.com/adlio/trello"
|
||||||
// "github.com/davecgh/go-spew/spew"
|
// "github.com/davecgh/go-spew/spew"
|
||||||
// "log"
|
"log"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -84,8 +83,11 @@ func (board *TrelloBoard) ExportToMarkdown() string {
|
||||||
var markdown bytes.Buffer
|
var markdown bytes.Buffer
|
||||||
var text string
|
var text string
|
||||||
|
|
||||||
lists, _ := board.Ptr.GetLists(trello.Defaults())
|
lists, err := board.Ptr.GetLists(trello.Defaults())
|
||||||
// spew.Dump(lists)
|
if err != nil {
|
||||||
|
log.Panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
text = fmt.Sprintf("# Board %s\n\n", board.Ptr.Name)
|
text = fmt.Sprintf("# Board %s\n\n", board.Ptr.Name)
|
||||||
markdown.WriteString(text)
|
markdown.WriteString(text)
|
||||||
|
|
||||||
|
@ -97,7 +99,10 @@ func (board *TrelloBoard) ExportToMarkdown() string {
|
||||||
text := fmt.Sprintf("\n## %s\n\n", list.Name)
|
text := fmt.Sprintf("\n## %s\n\n", list.Name)
|
||||||
markdown.WriteString(text)
|
markdown.WriteString(text)
|
||||||
|
|
||||||
cards, _ := list.GetCards(trello.Defaults())
|
cards, err := list.GetCards(trello.Defaults())
|
||||||
|
if err != nil {
|
||||||
|
log.Panic(err)
|
||||||
|
}
|
||||||
for _, card := range cards {
|
for _, card := range cards {
|
||||||
text := fmt.Sprintf("* %s\n", card.Name)
|
text := fmt.Sprintf("* %s\n", card.Name)
|
||||||
markdown.WriteString(text)
|
markdown.WriteString(text)
|
||||||
|
|
Loading…
Reference in a new issue