Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/cmd/eg: does not support variadic functions #17529

Open
mrwonko opened this issue Oct 20, 2016 · 0 comments
Open

x/tools/cmd/eg: does not support variadic functions #17529

mrwonko opened this issue Oct 20, 2016 · 0 comments
Labels
NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@mrwonko
Copy link

mrwonko commented Oct 20, 2016

What version of Go are you using (go version)?

Go 1.7.1
eg 69f6f5b

What operating system and processor architecture are you using (go env)?

MacOSX 10.12 Sierra (Darwin) x64

What did you do?

Given the template

package egtemplates

import (
    "fmt"
    "github.com/Sirupsen/logrus"
)

func before(vlog logrus.Logger, format string, args ...interface{}) {
    vlog.Errorf(fmt.Sprintf(format, args...))
}

func after(vlog logrus.Logger, format string, args ...interface{}) {
    vlog.Errorf(format, args...)
}

and the test file


package test

import (
    "fmt"

    "github.com/Sirupsen/logrus"
)

func articleCIPQ(vlog logrus.Logger) {
    vlog.Errorf(fmt.Sprintf("Table %s: %s", "something", "err"))
}

I executed eg -t egtemplates/logrus-errorf.go -v ./egtemplates/test/myfile.go.

What did you expect to see?

=== egtemplates/test/myfile.go (1 matches)
package test

import (
    "fmt"

    "github.com/Sirupsen/logrus"
)

func articleCIPQ(vlog logrus.Logger) {
    vlog.Errorf("Table %s: %s", "something", "err")
}

What did you see instead?

No substitutions, but no errors either.

@quentinmit quentinmit changed the title x/tools/cmd/eg does not appear to support ... argument expansions x/tools/cmd/eg: does not support variadic functions Oct 20, 2016
@quentinmit quentinmit added the NeedsFix The path to resolution is known, but the work has not been done. label Oct 20, 2016
@quentinmit quentinmit added this to the Unreleased milestone Oct 20, 2016
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants