code: func newPeernet(ctx context.Context, m *mocknet, p peer.ID, ps pstore.Peerstore) (*peernet, error) {
  
  	n := &peernet{
  		mocknet: m,
  		peer:    p,
  		ps:      ps,
  
  		connsByPeer: map[peer.ID]map[*conn]struct{}{},
  		connsByLink: map[*link]map[*conn]struct{}{},
  
  		notifs: make(map[inet.Notifiee]struct{}),
  	}
  
  	n.proc = goprocessctx.WithContextAndTeardown(ctx, n.teardown)
  	return n, nil
  }
docs: // newPeernet constructs a new peernet