| 16 | ) |
| 17 | |
| 18 | func ExampleMarkdownService_Render() { |
| 19 | client, err := github.NewClient() |
| 20 | if err != nil { |
| 21 | log.Fatalf("Error creating GitHub client: %v", err) |
| 22 | } |
| 23 | |
| 24 | input := "# heading #\n\nLink to issue #1" |
| 25 | opt := &github.MarkdownOptions{Mode: "gfm", Context: "google/go-github"} |
| 26 | |
| 27 | ctx := context.Background() |
| 28 | output, _, err := client.Markdown.Render(ctx, input, opt) |
| 29 | if err != nil { |
| 30 | log.Fatalf("Error rendering markdown: %v", err) |
| 31 | } |
| 32 | |
| 33 | fmt.Println(output) |
| 34 | } |
| 35 | |
| 36 | func ExampleRepositoriesService_GetReadme() { |
| 37 | client, err := github.NewClient() |