Newbie to Go Framework
Though I have been taking Go tutorials but when applied it practically, I am lost. Got few doubts in the code I have written.
The below is Python code
table1 =
{
‘q1’: [3]
‘q2’:[8,2]
“x”:[0xAAA]
}
class checkIDS(object):
t1 = 0xaa
t2 = 0xae
def classmethodA(a, val):
try:
except :
def classmethodB(a, name):
try:
except :
bv = {
“T1”: 0x01,
“T2”: 0x03,
}
class modA(checkIDS)
def __init__(self,zz):
bv.update({“T1”:0x03})
The above Python code is translated to Go format as shown below
type table1 struct
{
q1 [3] byte
q2 [8][2]byte
x [0xAAA]byte
}
type object struct {
a int
b int
}
How to redefine the below lines in Go ?
class checkIDS(object) and the methods below it?
I tried my best in defining as
func (self *A)
and unable to proceed further. How to define class as structs type in Go ?