Skip to content

Instantly share code, notes, and snippets.

@ccqpein
Created September 28, 2019 20:03
Show Gist options
  • Save ccqpein/7f7283f06ab8e090caac12b773532dff to your computer and use it in GitHub Desktop.
Save ccqpein/7f7283f06ab8e090caac12b773532dff to your computer and use it in GitHub Desktop.
function: ^func\ +\w+\((|(\w+\ +\w+\ *,*\ *)+(\w+\ +\.\.\.interface{})*)\)\ +(\w+|\((\w+\ *,*\ *)+\))\ *{.*$
interface: ^type\ +\w+\ +interface\ *{(|\ *\n*(\w+\((|(\w+\ +\w+\ *,*\ *)+(\w+\ +\.\.\.interface{})*)\)\ *(|\w+|\((\w+\ *,*\ *)+\))\n)*)*}
struct: ^type\ +\w+\ +struct\ *{(?<body>|\s*\n+(\s+?(\w+|\w+\s*,*\s*)+?\s+\w+\n+)*?)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment