mirror of
https://github.com/telanflow/mps.git
synced 2025-09-26 20:41:25 +08:00
code formatting
This commit is contained in:
2
.github/workflows/mps.yml
vendored
2
.github/workflows/mps.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
- name: Set up Go 1.x
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ^1.13
|
||||
go-version: ^1.16
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
|
@@ -2,14 +2,15 @@ package main
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/telanflow/mps"
|
||||
"github.com/telanflow/mps/middleware"
|
||||
"log"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"github.com/telanflow/mps"
|
||||
"github.com/telanflow/mps/middleware"
|
||||
)
|
||||
|
||||
// A simple reverse proxy server
|
||||
|
@@ -2,13 +2,14 @@ package main
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/telanflow/mps"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/signal"
|
||||
"regexp"
|
||||
"syscall"
|
||||
|
||||
"github.com/telanflow/mps"
|
||||
)
|
||||
|
||||
// A simple http proxy server
|
||||
|
@@ -2,18 +2,19 @@ package main
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/telanflow/mps"
|
||||
"log"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/telanflow/mps"
|
||||
)
|
||||
|
||||
var (
|
||||
upgrader = websocket.Upgrader{}
|
||||
upgrader = websocket.Upgrader{}
|
||||
endPointAddr = "localhost:9990"
|
||||
)
|
||||
|
||||
@@ -73,4 +74,3 @@ func main() {
|
||||
_ = srv.Close()
|
||||
log.Fatal("WebsocketProxy server stop!")
|
||||
}
|
||||
|
||||
|
@@ -1,10 +1,11 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"github.com/telanflow/mps"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/telanflow/mps"
|
||||
)
|
||||
|
||||
// SingleHostReverseProxy returns a mps.Middleware
|
||||
|
Reference in New Issue
Block a user