Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Write a plugin to modify generated functions #3077

Unanswered
Nikola-Milovic asked this question in Q&A
Discussion options

Hello everyone, I want to create a plugin that would append a piece of code to each of the generated functions at the beginning, basically this

	ctx, span := otel.Tracer.Start(ctx, NameOfFunction, trace.WithAttributes(not sure how I'd get the attributes but I'll figure it out))
	defer span.End()

I've been reading about the plugins but I am really not sure how to use them or write them, currently the docs and the examples are really bare, probably since its a novel feature. Any pointers on how I could approach this would be greatly appreciated!

(Might be cool to have a go template for a starter plugin)

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /