This commit is contained in:
Jeffrey Paul 2022-02-01 20:12:32 -08:00 committed by user
parent 9dd2682b49
commit 01e9433404
7 changed files with 52 additions and 3 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
*.pb.go
/cmd/mfer/mfer

View File

@ -1,12 +1,16 @@
PROTOC_GEN_GO := $(GOPATH)/bin/protoc-gen-go
default: compile
default: run
run: compile
./mfer
$(PROTOC_GEN_GO):
go get -u github.com/golang/protobuf/protoc-gen-go
compile: $(PROTOC_GEN_GO)
cd proto && go generate .
cd cmd/mfer && go build
clean:
rm -rfv proto/*.pb.go

17
cmd/mfer/main.go Normal file
View File

@ -0,0 +1,17 @@
package main
import (
"os"
"git.eeqj.de/sneak/mfer/mfer"
)
var (
Appname string = "mfer"
Version string
Buildarch string
)
func main() {
os.Exit(mfer.Run(Appname, Version, Buildarch))
}

8
go.mod Normal file
View File

@ -0,0 +1,8 @@
module git.eeqj.de/sneak/mfer
go 1.16
require (
github.com/golang/protobuf v1.5.2 // indirect
google.golang.org/protobuf v1.27.1
)

11
go.sum Normal file
View File

@ -0,0 +1,11 @@
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=

8
mfer/run.go Normal file
View File

@ -0,0 +1,8 @@
package mfer
import "fmt"
func Run(Appname, Version, Buildarch string) int {
fmt.Println("starting")
return 0
}

View File

@ -1,6 +1,6 @@
syntax = "proto3";
option go_package = "mfer";
option go_package = "git.eeqj.de/sneak/mfer/mfer";
import "google/protobuf/timestamp.proto";
@ -60,7 +60,7 @@ message MFFileInner {
Version version = 101;
// required manifest attributes:
uint64 fileCount = 102;
uint64 fileCount = 102; //FIXME is this necessary?
repeated MFFilePath files = 103;
// optional manifest attributes 2xx: