Skip to content

Commit

Permalink
contributing examples
Browse files Browse the repository at this point in the history
  • Loading branch information
awalterschulze committed Nov 30, 2017
1 parent bd5f8e5 commit 425b190
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions Contributing.md
@@ -0,0 +1,38 @@
# Contributing

tl;dr make a pull request

## Contributing Examples

We can always use better examples.
Contributing examples for a plugin can be done by creating a folder if one does not already exists in the `example/plugin` folder.

First create your example go file `foldername.go` with your example code.

Next create a Readme.md in the folder with the following content:

````
The <functionName> function ...
```go
```
goderive will generate the following code:
```go
```
````

The go blocks will be populated with your example code and the generated code using the following command:

```sh
cd .. # goderive/example
make
```

Finally go and add a link (if one does not already exist) in the top level Readme.md of the project.

You are ready to submit a pull request.

0 comments on commit 425b190

Please sign in to comment.