github goplus/xgo v0.7.2
Release v0.7.2

latest releases: v1.5.1, v1.5.0, v1.5.0-pre.3...
5 years ago

Git merge mode

We change merge mode to Squash and merge. It will combine all commits from the head branch into a single commit in the base branch.

Auto property

Let's see an example written in Go+:

import "github.com/goplus/gop/ast/goptest"

doc := goptest.New(`... Go+ code ...`)!

println(doc.Any().FuncDecl().Name())

In many languages, there is a concept named property who has get and set methods.

Suppose we have get property, the above example will be:

import "github.com/goplus/gop/ast/goptest"

doc := goptest.New(`... Go+ code ...`)!

println(doc.any.funcDecl.name)

In Go+, we introduce a concept named auto property. It is a get property, but is implemented automatically. If we have a method named Bar(), then we will have a get property named bar at the same time.

Go+ related packages

  • github.com/goplus/gop/ast/gopq
  • github.com/goplus/gop/ast/goptest

See tutorial/22-Auto-Property.

Flow control

  • break/continue/return in for range statements.

Thanks contribution of JessonChan (chendongpo@goplus.org).

Misc

  • Simplify test cases of cl/stmt_test.go.
  • Command gop export bug fixed.
  • Getting value from a map panics if the key not exists.
  • Export fmt package.
  • Update dependency: github.com/qiniu/x v1.11.5

Thanks contribution of JessonChan (chendongpo@goplus.org), visualfc (visualfc@goplus.org).

Don't miss a new xgo release

NewReleases is sending notifications on new releases.