mirror of
				https://github.com/vdsm/virtual-dsm.git
				synced 2025-11-04 08:54:51 +08:00 
			
		
		
		
	Go Compilation
Go Compilation
This commit is contained in:
		
						commit
						3c4715a207
					
				@ -1,10 +1,9 @@
 | 
				
			|||||||
FROM golang:1.20 AS builder
 | 
					FROM golang AS builder
 | 
				
			||||||
 | 
					
 | 
				
			||||||
COPY serial/ /src/serial/
 | 
					COPY serial/ /src/serial/
 | 
				
			||||||
WORKDIR /src/serial
 | 
					WORKDIR /src/serial
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RUN go get -d -v golang.org/x/net/html
 | 
					RUN go mod download
 | 
				
			||||||
RUN go get -d -v github.com/gorilla/mux
 | 
					 | 
				
			||||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /src/serial/main .
 | 
					RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /src/serial/main .
 | 
				
			||||||
 | 
					
 | 
				
			||||||
FROM debian:bookworm-slim
 | 
					FROM debian:bookworm-slim
 | 
				
			||||||
 | 
				
			|||||||
@ -2,3 +2,4 @@ module vdsm-serial
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
go 1.20
 | 
					go 1.20
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					require github.com/gorilla/mux v1.8.0
 | 
				
			||||||
 | 
				
			|||||||
@ -1 +1,2 @@
 | 
				
			|||||||
 | 
					github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
 | 
				
			||||||
 | 
					github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
 | 
				
			||||||
 | 
				
			|||||||
@ -1,15 +1,15 @@
 | 
				
			|||||||
package main
 | 
					package main
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"bytes"
 | 
					 | 
				
			||||||
	"encoding/binary"
 | 
					 | 
				
			||||||
	"flag"
 | 
					 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"log"
 | 
						"log"
 | 
				
			||||||
	"net"
 | 
						"net"
 | 
				
			||||||
 | 
						"flag"
 | 
				
			||||||
 | 
						"bytes"
 | 
				
			||||||
	"strconv"
 | 
						"strconv"
 | 
				
			||||||
	"net/http"
 | 
						"net/http"
 | 
				
			||||||
	"math/rand"
 | 
						"math/rand"
 | 
				
			||||||
 | 
						"encoding/binary"
 | 
				
			||||||
	"github.com/gorilla/mux"
 | 
						"github.com/gorilla/mux"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user