Commit 314baff9 authored by Felix Delattre's avatar Felix Delattre
Browse files

Provided basic go project structure

parent 8db3887b
Pipeline #19496 passed with stages
in 15 seconds
config.toml
main
rcli
# Test binary, build with `go test -c`
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
image: golang:latest
variables:
REPO_NAME: git.gfz-potsdam.de/dynamicexposure/rabotnik/rcli
before_script:
- go version
- mkdir -p $GOPATH/src/$(dirname $REPO_NAME)
- ln -svf $CI_PROJECT_DIR $GOPATH/src/$REPO_NAME
- cd $GOPATH/src/$REPO_NAME
stages:
- test
- build
format:
stage: test
script:
- go fmt $(go list ./... | grep -v /vendor/)
- go vet $(go list ./... | grep -v /vendor/)
- go test -race $(go list ./... | grep -v /vendor/)
compile:
stage: build
script:
- go build -race -ldflags "-extldflags '-static'" -o $CI_PROJECT_DIR/rcli
artifacts:
paths:
- rcli
......@@ -5,7 +5,7 @@ rabotnik command line interface
Copyright and copyleft
----------------------
Copyright (c) 2021
Copyright (C) 2021
* Helmholtz-Zentrum Potsdam Deutsches GeoForschungsZentrum GFZ
......
/*
* rabotnik command line interface
*
* Copyright (C) 2021:
* Helmholtz-Zentrum Potsdam Deutsches GeoForschungsZentrum GFZ
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
* General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see http://www.gnu.org/licenses/.
*/
package main
import (
"log"
)
/*
* Main function
*/
func main() {
log.Println("Hello world")
}
/*
* rabotnik command line interface
*
* Copyright (C) 2021:
* Helmholtz-Zentrum Potsdam Deutsches GeoForschungsZentrum GFZ
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
* General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see http://www.gnu.org/licenses/.
*/
package main
import (
"testing"
)
func TestMain(t *testing.T) {
err := error(nil)
if err != nil {
t.Fatal(err)
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment