code formatting

This commit is contained in:
telan
2023-09-01 09:57:41 +08:00
parent 460d140c05
commit 3a8126b0f8
5 changed files with 12 additions and 9 deletions

View File

@@ -16,7 +16,7 @@ jobs:
- name: Set up Go 1.x - name: Set up Go 1.x
uses: actions/setup-go@v2 uses: actions/setup-go@v2
with: with:
go-version: ^1.13 go-version: ^1.16
id: go id: go
- name: Check out code into the Go module directory - name: Check out code into the Go module directory

View File

@@ -2,14 +2,15 @@ package main
import ( import (
"errors" "errors"
"github.com/telanflow/mps"
"github.com/telanflow/mps/middleware"
"log" "log"
"net/http" "net/http"
"net/url" "net/url"
"os" "os"
"os/signal" "os/signal"
"syscall" "syscall"
"github.com/telanflow/mps"
"github.com/telanflow/mps/middleware"
) )
// A simple reverse proxy server // A simple reverse proxy server

View File

@@ -2,13 +2,14 @@ package main
import ( import (
"errors" "errors"
"github.com/telanflow/mps"
"log" "log"
"net/http" "net/http"
"os" "os"
"os/signal" "os/signal"
"regexp" "regexp"
"syscall" "syscall"
"github.com/telanflow/mps"
) )
// A simple http proxy server // A simple http proxy server

View File

@@ -2,18 +2,19 @@ package main
import ( import (
"errors" "errors"
"github.com/gorilla/websocket"
"github.com/telanflow/mps"
"log" "log"
"net/http" "net/http"
"net/url" "net/url"
"os" "os"
"os/signal" "os/signal"
"syscall" "syscall"
"github.com/gorilla/websocket"
"github.com/telanflow/mps"
) )
var ( var (
upgrader = websocket.Upgrader{} upgrader = websocket.Upgrader{}
endPointAddr = "localhost:9990" endPointAddr = "localhost:9990"
) )
@@ -73,4 +74,3 @@ func main() {
_ = srv.Close() _ = srv.Close()
log.Fatal("WebsocketProxy server stop!") log.Fatal("WebsocketProxy server stop!")
} }

View File

@@ -1,10 +1,11 @@
package middleware package middleware
import ( import (
"github.com/telanflow/mps"
"net/http" "net/http"
"net/url" "net/url"
"strings" "strings"
"github.com/telanflow/mps"
) )
// SingleHostReverseProxy returns a mps.Middleware // SingleHostReverseProxy returns a mps.Middleware