First of all, in Go there are no enums. The common way of implementing enum-like functionality is via constants:
const(
ConstantText = ""
ConstantInt int64 = 2342423324
)
First of all, in Go there are no enums. The common way of implementing enum-like functionality is via constants:
const(
ConstantText = ""
ConstantInt int64 = 2342423324
)
func TestReaderBlaBlaBla1(t *testing.T) { | |
descriptor := &TestMemoryDescriptor{Array: bytes} //input | |
result := Read(descriptor, 1, 1, false) | |
assert.Equal(t, 5, result, | |
"Result expected: %v, actual: %v, for test data: %v", v.expected, result, v) | |
} | |
func TestReaderBlaBlaBla2(t *testing.T) { | |
descriptor := &TestMemoryDescriptor{Array: bytes} //input | |
result := Read(descriptor, 1, 2, false) |
// Replacement for https://github.com/elastic/cloud-on-k8s/blob/master/test/e2e/cmd/run/run.go#L346-L365 | |
var f *os.File | |
if h.logToFile { | |
f, err = os.Create(testsLogFile) | |
if err != nil { | |
log.Error(err, "Can't create file for test output") | |
return | |
} | |
defer f.Close() |
#!/usr/bin/env python | |
import base64 | |
import hmac | |
import hashlib | |
string = raw_input("Enter string to encode: ") | |
key = raw_input("Enter key: ") | |
hash = hmac.new(key, string, hashlib.sha1).digest() |
I hereby claim:
To claim this, I am signing this object: