Skip to content

Commit

Permalink
Don't run examples in Go 1.21 yet
Browse files Browse the repository at this point in the history
Revert this commit when we release a new go-libp2p version compatible
with Go 1.21
  • Loading branch information
MarcoPolo committed Aug 15, 2023
1 parent 08ca965 commit 9e1f3fc
Show file tree
Hide file tree
Showing 48 changed files with 120 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/chat-with-mdns/flags.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/chat-with-mdns/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/chat-with-mdns/mdns.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/chat-with-rendezvous/chat.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/chat-with-rendezvous/flags.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/chat/chat.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

/*
*
* The MIT License (MIT)
Expand Down
2 changes: 2 additions & 0 deletions examples/chat/chat_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/echo/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/echo/main_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
8 changes: 8 additions & 0 deletions examples/go_121_workaround_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//go:build go1.21

package main

import "testing"

// Needed so that we run at least one test in Go 1.21 so that our go test command exits successfully
func TestNothing(t *testing.T) {}
2 changes: 2 additions & 0 deletions examples/http-proxy/proxy.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/01-Transports/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/02-Multiaddrs/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/03-Muxing-Encryption/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/05-Discovery/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/05-Discovery/protocol.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/06-Pubsub/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/06-Pubsub/protocol.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/07-Messaging/chat.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/07-Messaging/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/07-Messaging/protocol.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/07-Messaging/pubsub.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/08-End/chat.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/08-End/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/08-End/protocol.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/ipfs-camp-2019/08-End/pubsub.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
8 changes: 8 additions & 0 deletions examples/ipfs-camp-2019/go_121_workaround_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//go:build go1.21

package main

import "testing"

// Needed so that we run at least one test in Go 1.21 so that our go test command exits successfully
func TestNothing(t *testing.T) {}
2 changes: 2 additions & 0 deletions examples/libp2p-host/host.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/libp2p-host/host_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/metrics-and-dashboards/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/multipro/echo.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/multipro/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/multipro/main_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/multipro/node.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/multipro/pb/p2p.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions examples/multipro/ping.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//go:build go1.21

package main

import "testing"

// Needed so that we run at least one test in Go 1.21 so that our go test command exits successfully
func TestNothing(t *testing.T) {}
2 changes: 2 additions & 0 deletions examples/pubsub/basic-chat-with-rendezvous/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/pubsub/chat/chatroom.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
8 changes: 8 additions & 0 deletions examples/pubsub/chat/go_121_workaround_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//go:build go1.21

package main

import "testing"

// Needed so that we run at least one test in Go 1.21 so that our go test command exits successfully
func TestNothing(t *testing.T) {}
2 changes: 2 additions & 0 deletions examples/pubsub/chat/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/pubsub/chat/ui.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/relay/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/relay/main_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/routed-echo/bootstrap.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/routed-echo/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/testutils/logharness.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package testutils

import (
Expand Down
2 changes: 2 additions & 0 deletions examples/testutils/net.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !go1.21

package testutils

import (
Expand Down

0 comments on commit 9e1f3fc

Please sign in to comment.