Annoying VS Code "error"

I have a built in function within a Go template. The function works without any execution errors, but VS Code claims there is an error.

And the terminal shows an error:

Unexpected keyword or identifier.

I have installed “Go for Visual Studio Code”, but it seems not recognize functions in the templates. Any tips how to get rid of this “error”?

Shouldn’t there be a space before the chart? as in:

{{ chart "..." }}


{{chart "..." }}

Does not matter. The code works perfect, but VS Code report an error.

Is that in a .go file or something like an .html file? It looks to me like it’s an html file and thus it has nothing to do with the Go for Visual Studio plugin. VSCode is trying to verify that it’s valid HTML and thus is validating the stuff between <script> tags is valid JavaScript.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.