Go client for the Write.as API https://developers.write.as
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

25 righe
446 B

  1. package writeas
  2. import (
  3. "context"
  4. "testing"
  5. )
  6. func TestMarkdown(t *testing.T) {
  7. dwac := NewDevClient()
  8. in := "This is *formatted* in __Markdown__."
  9. out := `<p>This is <em>formatted</em> in <strong>Markdown</strong>.</p>
  10. `
  11. res, err := dwac.Markdown(context.Background(), in, "")
  12. if err != nil {
  13. t.Errorf("Unexpected fetch results: %+v, err: %v\n", res, err)
  14. }
  15. if res != out {
  16. t.Errorf(`Got: '%s'
  17. Expected: '%s'`, res, out)
  18. }
  19. }