You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** * @file test.go * @author your name (you@domain.com) * @brief a test file * @version 0.1 * @date 2021-05-18 * * @copyright Copyright (c) 2021 * */package main
import"fmt"/** * @brief a function to swap two data * * @param[in,out] a a pointer for the first element * @param[in,out] b a pointer for the second element * @return int */funcmy_swap_function(a*int, b*int) int {
vartint=*a*a=*b*b=treturn0
}
/** * @brief main function */funcmain() {
varaint=3varbint=4varretint=my_swap_function(&a, &b)
ifret==0 {
fmt.Printf("%d %d\n", a, b)
}
}
there is no any syntax highlight on the Doxygen comments.
But the C code works fine on Doxygen style syntax highlight.
Even the function toolbox supports Doxygen well.
I hope this feature can be supported in Go as well.
The text was updated successfully, but these errors were encountered:
I understand the desire for consistency across languages, but Go has its own idiomatic comment format, and Doxygen support would only encourage non-idiomatic comments in Go. To be blunt,
/** * @brief a function to swap two data * * @param[in,out] a a pointer for the first element * @param[in,out] b a pointer for the second element * @return int */funcmy_swap_function(a*int, b*int) int {
vartint=*a*a=*b*b=treturn0
}
is the opposite of the idiomatic code that the Go community encourages (including the snake case function name, but I assume that's not your point here).
https://www.doxygen.nl/index.html
https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html
As the code below,
there is no any syntax highlight on the Doxygen comments.
But the C code works fine on Doxygen style syntax highlight.
Even the function toolbox supports Doxygen well.
I hope this feature can be supported in Go as well.
The text was updated successfully, but these errors were encountered: