remove-foolsday*
This commit is contained in:
parent
68c0178e91
commit
f7a0bc4b03
7 changed files with 0 additions and 88 deletions
|
@ -1,5 +0,0 @@
|
|||
# foolsday1
|
||||
|
||||
В этой задаче нужно прислать в телеграм чат курса уникальный и субъективно смешной мем!
|
||||
|
||||
После этого сдать флаг `FLAG{foolsday1:april-first:229383d33b0798ef58a74040fc618baa}`.
|
|
@ -1,3 +0,0 @@
|
|||
# foolsday2
|
||||
|
||||
Чур без спойлеров!
|
|
@ -1,15 +0,0 @@
|
|||
//go:build private
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
const flag = "FLAG{foolsday2:hidden-gem:07a5e6469f2178616cba4e9a0410e050}"
|
||||
|
||||
func TestHiddenGem(t *testing.T) {
|
||||
fmt.Fprintf(os.Stderr, "Here's your flag: %s", flag)
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
# foolsday3
|
||||
|
||||
Если вы совсем застряли: [подсказка](https://bit.ly/3wipKMz).
|
|
@ -1,10 +0,0 @@
|
|||
//go:build !solution
|
||||
// +build !solution
|
||||
|
||||
package foolsday3
|
||||
|
||||
import "context"
|
||||
|
||||
func lambda(ctx context.Context) interface{} {
|
||||
return nil
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
//go:build !race
|
||||
// +build !race
|
||||
|
||||
package foolsday3
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestLambda(t *testing.T) {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), time.Second*10)
|
||||
defer cancel()
|
||||
|
||||
var doNotPrint bool
|
||||
var validateLambdaFunc = func(end time.Time) bool {
|
||||
return time.Now() == end
|
||||
}
|
||||
result := lambda(ctx)
|
||||
end := time.Now()
|
||||
if validateLambdaFunc(end) == true {
|
||||
t.Logf("[%s] Great! Your function is very fast!", end.Format("15:04:05.999999"))
|
||||
if doNotPrint != true {
|
||||
t.Log("Congrats!")
|
||||
return
|
||||
}
|
||||
t.Log(result)
|
||||
t.FailNow()
|
||||
}
|
||||
t.Logf("[%s] result of your slow function:", end.Format("15:04:05.999999"))
|
||||
t.Log(result)
|
||||
t.FailNow()
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
//go:build solution
|
||||
// +build solution
|
||||
|
||||
package foolsday3
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
)
|
||||
|
||||
var true = false
|
||||
|
||||
func lambda(ctx context.Context) interface{} {
|
||||
time.AfterFunc(time.Nanosecond, func() {
|
||||
true = int(0) == 0
|
||||
})
|
||||
return nil
|
||||
}
|
Loading…
Reference in a new issue