posener / goreadme

Generate readme file from Go doc. Now available as a Github action!
MIT License
213 stars 31 forks source link

Add destination-path argument allowing overriding destination #97

Open romainbou opened 3 years ago

romainbou commented 3 years ago

Add "destination-path" option to allow picking the destination of all the generated readme files.

This allows saving all the documentation in a subfolder like docs inside a repository. Example goreadme -import-path=. -destination-path=docs/README.md Will generate docs/README.md instead of README.md

codecov[bot] commented 3 years ago

Codecov Report

Merging #97 (5381a31) into master (7e9b8ca) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #97   +/-   ##
=======================================
  Coverage   69.51%   69.51%           
=======================================
  Files           3        3           
  Lines          82       82           
=======================================
  Hits           57       57           
  Misses         15       15           
  Partials       10       10           
Impacted Files Coverage Δ
goreadme.go 67.34% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7e9b8ca...5381a31. Read the comment docs.

posener commented 3 years ago

Hey, you can actually set the output path: env 'readme-file=docs/readme.md' goreadme, or with the readme-file argument for the Github action.

In the PR, you also created the parent directory, which we can add in any case.

Does that work for you?