Skip to content

Instantly share code, notes, and snippets.

@leetrout
Created August 5, 2020 20:26
Show Gist options
  • Save leetrout/1a3629fc7a4c5250521df6c0dcd95bf8 to your computer and use it in GitHub Desktop.
Save leetrout/1a3629fc7a4c5250521df6c0dcd95bf8 to your computer and use it in GitHub Desktop.
Markdown Diffs

The current code looks like this:

type Demo struct {
  Field        int
  AnotherField string
}

We actually need to track the Thing

 type Demo struct {
   Field        int
   AnotherField string
+  Thing        float64
 }

And we need to swap out the Field:

 type Demo struct {
-   Field        int
+   FieldFixed   int
    AnotherField string
    Thing        float64
 }

You can use diff as the "type" in code fences: (note using apostophe instead of backticks for demonstration purposes)

'''diff
+Added a thing
-Removed a thing
 Nothing changed
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment