From 01e9433404af8b4d6cb2191e3cd9e6aa368a185c Mon Sep 17 00:00:00 2001 From: sneak Date: Tue, 1 Feb 2022 20:12:32 -0800 Subject: [PATCH] latest --- .gitignore | 1 + Makefile | 6 +++++- cmd/mfer/main.go | 17 +++++++++++++++++ go.mod | 8 ++++++++ go.sum | 11 +++++++++++ mfer/run.go | 8 ++++++++ proto/mf.proto | 4 ++-- 7 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 cmd/mfer/main.go create mode 100644 go.mod create mode 100644 go.sum create mode 100644 mfer/run.go diff --git a/.gitignore b/.gitignore index c61a5e8..d61cd03 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *.pb.go +/cmd/mfer/mfer diff --git a/Makefile b/Makefile index 0ebdbba..f2a95e1 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/cmd/mfer/main.go b/cmd/mfer/main.go new file mode 100644 index 0000000..c758938 --- /dev/null +++ b/cmd/mfer/main.go @@ -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)) +} diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..ac7b7c9 --- /dev/null +++ b/go.mod @@ -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 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..85ba719 --- /dev/null +++ b/go.sum @@ -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= diff --git a/mfer/run.go b/mfer/run.go new file mode 100644 index 0000000..f746a0e --- /dev/null +++ b/mfer/run.go @@ -0,0 +1,8 @@ +package mfer + +import "fmt" + +func Run(Appname, Version, Buildarch string) int { + fmt.Println("starting") + return 0 +} diff --git a/proto/mf.proto b/proto/mf.proto index ba9ab5e..1e261a3 100644 --- a/proto/mf.proto +++ b/proto/mf.proto @@ -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: