How to copy slice in Golang? – Code Example Akash Mittal September 5, 2022 In order to copy a slice in Golang, you can use copy(dst, src) function. This function works on the minimum length of dst and src. So, if you want to… View Post
Remove last character from string in Golang – Code Example Akash Mittal August 30, 2022 You can get a range of characters within a string in Golang using [:]. It takes the start and end index and return the substring. To remove last character, you… View Post
Golang run test cases of few files not whole project – Code Example Akash Mittal August 30, 2022 To run test cases in golang for the whole project, you can use go test <package_name>. But if you want to run test cases of few files, you will need… View Post