Skip to content

Releases: FollowTheProcess/cli

v0.21.1

16 Jun 11:49
v0.21.1

Choose a tag to compare

Changes

  • No changes

v0.21.0

29 Apr 19:39

Choose a tag to compare

Changes

πŸ’₯ Breaking Changes

πŸ”₯ Removals and Deprecations

v0.20.1

26 Apr 13:55

Choose a tag to compare

Changes

🐎 Performance

v0.20.0

24 Apr 15:49

Choose a tag to compare

Changes

πŸš€ Features

πŸͺ² Fixes

🐎 Performance

🚨 Testing

πŸ”¨ Refactoring

πŸ“¦ Dependencies

v0.19.0

03 Apr 14:31

Choose a tag to compare

Changes

πŸš€ Features

πŸ“¦ Dependencies

v0.18.3

14 Dec 12:43

Choose a tag to compare

Changes

πŸ“š Documentation

v0.18.2

30 Nov 14:58

Choose a tag to compare

Changes

🐎 Performance

πŸ“¦ Dependencies

v0.18.1

17 Nov 17:11

Choose a tag to compare

Changes

πŸš€ Features

πŸ”¨ Refactoring

πŸ“¦ Dependencies

v0.18.0

12 Nov 20:26

Choose a tag to compare

Changes

Made Flags follow the same Option customisation mechanism as Args, setting a default value in the cli.Flag function signature is no longer required, a flag assumes it's zero value by default and may be overridden with cli.FlagDefault(T)

πŸ’₯ Breaking Changes

πŸš€ Features

πŸ”¨ Refactoring

v0.17.0

09 Nov 17:08

Choose a tag to compare

Changes

This release breaks quite a bit of stuff, but for a good cause!

Goodbye []string and hello to type safe structs!

I've completed re-worked how positional arguments work, instead of getting the raw []string passed to the Run method, I've introduced a mechanism for declaring type-safe structs describing the positional arguments, which are then inferred using generics and parsed similar to how flags already worked.

As a result of this:

  • I've dropped the cli.Allow option and all the argument validators as this new mechanism is much better and allows you to define exactly what
    arguments you want and what types they are
  • The signature of the function provided to cli.Run has changed from func(cmd *cli.Command, args []string) error to func(cmd *cli.Command) error
  • Raw positional arguments can still be obtained using cmd.Args()
  • cli.NoShortHand is now flag.NoShortHand
  • cli.FlagCount is now flag.Count

See the updated README and the updated examples for how to change your code to match the new behaviour.

I've updated my projects that use this and the changes honestly aren't so bad

πŸ’₯ Breaking Changes

πŸš€ Features

🚨 Testing

πŸ”¨ Refactoring