diff options
author | Vincent Ambo <tazjin@google.com> | 2019-12-20T20·18+0000 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2019-12-20T20·18+0000 |
commit | 03bfe08e1dd9faf48b06cb146bfa446575cde88a (patch) | |
tree | 55317968922a9b2a01516f1b79527874df037517 /tools/gotest | |
parent | e52eed3cd4f73779c2e7c350537fb346835ba9f3 (diff) |
chore: Significantly restructure folder layout r/237
This moves the various projects from "type-based" folders (such as "services" or "tools") into more appropriate semantic folders (such as "nix", "ops" or "web"). Deprecated projects (nixcon-demo & gotest) which only existed for testing/demonstration purposes have been removed. (Note: *all* builds are broken with this commit)
Diffstat (limited to 'tools/gotest')
-rw-r--r-- | tools/gotest/default.nix | 27 | ||||
-rw-r--r-- | tools/gotest/lib.go | 11 | ||||
-rw-r--r-- | tools/gotest/main.go | 16 | ||||
-rw-r--r-- | tools/gotest/test.proto | 9 |
4 files changed, 0 insertions, 63 deletions
diff --git a/tools/gotest/default.nix b/tools/gotest/default.nix deleted file mode 100644 index 168d15748e1f..000000000000 --- a/tools/gotest/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -# This file demonstrates how to make use of pkgs.buildGo. -# -# It introduces libraries and protobuf support, however gRPC support -# is not yet included. -# -# From the root of this repository this example can be built with -# `nix-build -A tools.gotest` -{ pkgs, ... }: - -let - inherit (pkgs) buildGo; - - somelib = buildGo.package { - name = "somelib"; - srcs = [ ./lib.go ]; - }; - - someproto = buildGo.proto { - name = "someproto"; - proto = ./test.proto; - }; - -in buildGo.program { - name = "gotest"; - srcs = [ ./main.go ]; - deps = [ somelib someproto ]; -} // { meta.enableCI = true; } diff --git a/tools/gotest/lib.go b/tools/gotest/lib.go deleted file mode 100644 index 0aeebb2aea69..000000000000 --- a/tools/gotest/lib.go +++ /dev/null @@ -1,11 +0,0 @@ -package somelib - -import "fmt" - -func Name() string { - return "edef" -} - -func Greet(s string) string { - return fmt.Sprintf("Hello %s", s) -} diff --git a/tools/gotest/main.go b/tools/gotest/main.go deleted file mode 100644 index 99218c077617..000000000000 --- a/tools/gotest/main.go +++ /dev/null @@ -1,16 +0,0 @@ -// This program just exists to import some libraries and demonstrate -// that the build works, it doesn't do anything useful. -package main - -import ( - "fmt" - "somelib" - "someproto" -) - -func main() { - p := someproto.Person{ - Name: somelib.Name(), - } - fmt.Println(somelib.Greet(fmt.Sprintf("%v", p))) -} diff --git a/tools/gotest/test.proto b/tools/gotest/test.proto deleted file mode 100644 index 76af63072be3..000000000000 --- a/tools/gotest/test.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; -package someproto; - -import "google/protobuf/timestamp.proto"; - -message Person { - string name = 1; - google.protobuf.Timestamp last_updated = 2; -} |