Skip to content

v1.0

Compare
Choose a tag to compare
@j178 j178 released this 30 May 07:16
· 194 commits to master since this release
v1.0
abb3045

Breaking changes in 1.0

Use single string for command arguments

We changed code.cpp.cxxflags and editor.args from array of string to a single string. If you upgraded from an older version, you will see error like this:

FATA unmarshal config failed: 2 error(s) decoding:

* 'code.cpp.cxxflags' expected type 'string', got unconvertible type '[]interface {}', value: '[-O2 -std=c++17]'
* 'editor.args' expected type 'string', got unconvertible type '[]interface {}', value: '[]'

You can manually fix this by changing code.cpp.cxxflags and editor.args to a signle string in ~/.config/leetgo/config.yaml, or you can use
leetgo init -f -t cn to regenerate the global configuration.

Must specify opening files in custom editor arguments

For example:

editor:
  use: custom
  command: subl.exe
  args: ""

In previous version, leetgo will open the generated code file using subl.exe. But in 1.0, you must specify which file to open, you can use
{{.CodeFile}}, {{.TestFile}}, {{.DescriptionFile}} or {{.TestCasesFile}} in args to open the specific file. Additionly, you can use {{.Files}} to open all generated files.

editor:
  use: custom
  command: subl.exe
  args: "{{.Files}}"

Changelog

Features

Bug fixes

Others