/leetcode-init

:triangular_ruler: A tool to create leetcode code template via cli.

Primary LanguageGoMIT LicenseMIT

leetcode-init

A tool to creates leetcode code template via cli.

Version Build Status Go Report Card License GoDoc FOSSA Status

Install

go get -u github.com/WindomZ/leetcode-init/...

Usage

Take the first problem(1. Two Sum) for example:

leetcode-init -k 1
# or
leetcode-init -k two-sum
# or
leetcode-init -k 'Two Sum'
# or
leetcode-init -u 'https://leetcode.com/problems/two-sum'

Then, a directory(name twosum) is generated under the current path.

.
└── twosum
    ├── README.md
    ├── twosum.go
    └── twosum_test.go

If with -m TEMPLATE.md:

leetcode-init -t two-sum -m TEMPLATE.md

loads TEMPLATE.md file and renders it in the directory.

.
└── twosum
    ├── README.md
    ├── TEMPLATE.md
    ├── twosum.go
    └── twosum_test.go

Related

Contributing

Welcome to pull requests, report bugs, suggest ideas and discuss leetcode-init on issues page.

If you like it then you can put a on it.

Roadmap

  • Support Golang.
  • Support JavaScript.
  • Support Python.

License

MIT

FOSSA Status