Skip to content

libgopar #6

@brenthuisman

Description

@brenthuisman

The second thing I'd like to do is make gopar suitable for use as a library. By that I don't mean all the primitives it contains, but (also?) the interface through main(). The fastest way to to it would be to turn main() into par(args []string), and have main() call it. However I'm certain you would prefer a break up into separate create(), verify() and repair() functions :) In which case, the flagsetting part of main needs to be duplicated. Copy paste or is there a cleaner way? With my C++/Python hat on, I think of hiding all that in a class, but that doesn't seem to be the Go way so I ask.

  • What form would you prefer? Maybe another?
  • Where in the file hierarchy would you put the lib, meant for external use? Is there a convention like /cmd? Maybe just the root?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions