carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1package console
2
3import (
4 "reflect"
5 "testing"
6)
7
8func TestBorrowedRegistryDoesNotExposeClose(t *testing.T) {
9 for name, fn := range map[string]any{
10 "openRegistry": openRegistry,
11 "openPassRegistry": (*Server).openPassRegistry,
12 } {
13 if _, ok := reflect.TypeOf(fn).Out(0).MethodByName("Close"); ok {
14 t.Errorf("%s lets callers close the shared registry", name)
15 }
16 }
17}
18