On Mon, Mar 21, 2022 at 6:58 PM Jagan Sivakumar wrote:
>
> Trying to run a sample GO program cross compiled to RISCV platform.
> Getting segmentation violation issues when performing read and write
> in a large array list.
> Kindly let me know how to address the issue
>
> Sample GO Program:
> pack
HI Ian
Thanks for your quick response. Send the mail in plain text mode.
Trying to run a sample GO program cross compiled to RISCV platform.
Getting segmentation violation issues when performing read and write
in a large array list.
Kindly let me know how to address the issue
Sample GO Program:
p
In Go, goroutines are meant to explicitly signal each other; further, it
seems very intentional that goroutines are never interrupted in the middle
of execution like an interrupt service routine might in a lower-level
situation.
It was mentioned in a prior message a bit, but to add more details
This is brought up in the release notes:
https://tip.golang.org/doc/go1.18#generics
The Go compiler only supports calling a method m on a value x of type
> parameter type P if m is explicitly declared by P's constraint interface.
> Similarly, method values x.m and method expressions P.m also are o
I have the following code snippet.
type workloadInterface interface {
*appsV1.Deployment | *appsV1.StatefulSet
}
.
.
.
func (a *adapter) processDepOrSSForSvc(client kubernetes.Interface,
ns, svcName, workloadName, svcVersionType string) {
switch svcVersionType {
c
Perhaps something like this?
```go
func Convert[T, A any](src []T, converter func(T) A) []A {
result := make([]A, len(src))
for index, a := range src {
result[index] = converter(a)
}
return result
}
```
See https://play.golang.com/p/rq89Wposc-D
On Su