fixing ports
This commit is contained in:
@@ -27,12 +27,11 @@ type Result struct {
|
||||
}
|
||||
|
||||
func listenOnFreePort() (net.Listener, string, error) {
|
||||
ln, err := net.Listen("tcp", "127.0.0.1:0")
|
||||
ln, err := net.Listen("tcp", "127.0.0.1:8080")
|
||||
if err != nil {
|
||||
return nil, "", fmt.Errorf("finding free port: %w", err)
|
||||
return nil, "", fmt.Errorf("listening on port 8080: %w", err)
|
||||
}
|
||||
port := ln.Addr().(*net.TCPAddr).Port
|
||||
return ln, fmt.Sprintf("http://localhost:%d/callback", port), nil
|
||||
return ln, "http://localhost:8080/callback", nil
|
||||
}
|
||||
|
||||
// TwitterOAuth2 runs the OAuth 2.0 PKCE flow for Twitter/X. It opens the
|
||||
|
||||
Reference in New Issue
Block a user