Golang doesn’t support ternary operation. Below is the func which can be used as a Ternary func. Define one time and call it across the project. import the util package in your Go files and use where ever required. Cheers!!!! Happy coding!.
1 Comment
Sort: