Skip to content

[question] No error management? #104

Description

@erdnaxeli

I noticed that none of the functions generated by qtc returns an error.

In this example, WriteTest return like everything was good:

package main

import (
        "errors"
        "os"
        "github.com/erdnaxeli/test/templates"
)

type ErrorIO struct {}

func (ErrorIO) Write(buf []byte) (int, error) {
        os.Stdout.Write(buf)
        return 0, errors.New("some error")
}

func main() {
        templates.WriteTest(ErrorIO{})
}

The template is the following:

{% func Test() %}
	Hello, world!
{% endfunc %}

Maybe the methods should return any error?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions