How do I get jobName out of a job if they are private in a struct #581
-
I want to print out a table in console of all the registered jobs, and I am having difficulties accessing those fields. This goes for a name particularly. s.Every(5).Seconds().Name("somejob").Tag("sometag").Do(func() {
fmt.Println("say something")
}
for _, j := range s.Jobs() {
fmt.Println(j)
} This is the output I get:
|
Beta Was this translation helpful? Give feedback.
Answered by
JohnRoesler
Oct 28, 2023
Replies: 1 comment
-
https://github.com/go-co-op/gocron/releases/tag/v1.35.0 has GetName() |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
JohnRoesler
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/go-co-op/gocron/releases/tag/v1.35.0 has GetName()