From 874632ae53e2f7ab0fa68cec8f55b165c2515e2b Mon Sep 17 00:00:00 2001 From: hoijui Date: Sat, 23 Mar 2019 09:01:22 +0100 Subject: [PATCH 01/28] Makefile: simplify & standardize --- Makefile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 4f84bc4..dbf409e 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,7 @@ + nix: - go build -o $(GOPATH)/bin/circuit cmd/circuit/main.go cmd/circuit/server.go cmd/circuit/hmac.go \ - cmd/circuit/chan.go cmd/circuit/dns.go cmd/circuit/joinleave.go \ - cmd/circuit/ls.go cmd/circuit/wait.go cmd/circuit/util.go \ - cmd/circuit/start.go cmd/circuit/procdkr.go cmd/circuit/peek.go \ - cmd/circuit/load.go cmd/circuit/std.go cmd/circuit/recv.go + cd cmd/circuit && go install clean: rm $(GOPATH)/bin/circuit + From fd7aa5f17fd314a99777136ec24cde260780e07a Mon Sep 17 00:00:00 2001 From: hoijui Date: Sat, 23 Mar 2019 09:01:47 +0100 Subject: [PATCH 02/28] Travis-CI: define the import path [fix] --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2ee80ca..701c71a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,7 @@ language: go +go_import_path: github.com/gocircuit/circuit + go: - - tip +- tip + From c29dd1a50773f5c44a86cc7b66c086b7d1aaf43c Mon Sep 17 00:00:00 2001 From: hoijui Date: Sat, 23 Mar 2019 09:26:53 +0100 Subject: [PATCH 03/28] Travis-CI: fetch dependencies [fix] --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 701c71a..50fe7f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,9 @@ language: go go_import_path: github.com/gocircuit/circuit +before_install: +- go get -v github.com/pkg/errors github.com/urfave/cli + go: - tip From 897a1e1be956f8a4a00c01c2c468e34610226cab Mon Sep 17 00:00:00 2001 From: hoijui Date: Mon, 25 Mar 2019 17:41:01 +0100 Subject: [PATCH 04/28] README: use Travis-CI for build stati --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b3a43d5..c9018fc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Circuit -[![Build Status](https://drone.io/github.com/gocircuit/circuit/status.png)](https://drone.io/github.com/gocircuit/circuit/latest) [![GoDoc](https://godoc.org/github.com/gocircuit/circuit/client?status.png)](https://godoc.org/github.com/gocircuit/circuit/client) +[![Build Status](https://travis-ci.org/gocircuit/circuit.svg?branch=master)](https://travis-ci.org/gocircuit/circuit) +[![GoDoc](https://godoc.org/github.com/gocircuit/circuit?status.png)](https://godoc.org/github.com/gocircuit/circuit) ![Engineering role separation.](https://raw.githubusercontent.com/gocircuit/circuit/master/misc/img/3.png) From e7a89a119bcdaa0b77a18abc97a53f6386b9d405 Mon Sep 17 00:00:00 2001 From: Eric Van Hensbergen Date: Sun, 31 Mar 2019 20:48:17 -0500 Subject: [PATCH 05/28] switch from syscall.Dup2 to syscall.Dup3 to fix aarch64 build Signed-off-by: Eric Van Hensbergen --- kit/debug/sigpanic_save_panic_trace.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kit/debug/sigpanic_save_panic_trace.go b/kit/debug/sigpanic_save_panic_trace.go index 9b0856c..6fa3218 100644 --- a/kit/debug/sigpanic_save_panic_trace.go +++ b/kit/debug/sigpanic_save_panic_trace.go @@ -25,7 +25,7 @@ func SavePanicTrace() { if err != nil { panic("dumper (no file) " + r.(fmt.Stringer).String()) } - syscall.Dup2(int(file.Fd()), int(os.Stderr.Fd())) + syscall.Dup3(int(file.Fd()), int(os.Stderr.Fd()), 0) // TRY: defer func() { file.Close() }() panic("dumper " + r.(string)) } From 2ccf48234da671b1b030a987747c1ead1c2e8081 Mon Sep 17 00:00:00 2001 From: hoijui Date: Sat, 20 Apr 2019 22:47:40 +0200 Subject: [PATCH 06/28] README: use relative links to images --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c9018fc..00ce839 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Build Status](https://travis-ci.org/gocircuit/circuit.svg?branch=master)](https://travis-ci.org/gocircuit/circuit) [![GoDoc](https://godoc.org/github.com/gocircuit/circuit?status.png)](https://godoc.org/github.com/gocircuit/circuit) -![Engineering role separation.](https://raw.githubusercontent.com/gocircuit/circuit/master/misc/img/3.png) +![Engineering role separation.](img/3.png) **The CIRCUIT is a new way of thinking. It is deceptively similar to existing software, while being quite different.** @@ -16,7 +16,7 @@ Circuit was designed to enable clear, accountable and safe interface between the roles in a technology enterprise, ultimately increasing productivity. Engineering role separation in a typical circuit-based architecture is illustrated above. -![A circuit-managed cloud.](https://raw.githubusercontent.com/gocircuit/circuit/master/misc/img/header.png) +![A circuit-managed cloud.](img/header.png) Users of circuit are @@ -155,7 +155,7 @@ This time, use the `-j` option to tell the new server to join the first one: You now have two mutually-aware circuit servers, running on two different hosts in your cluster. -![A circuit system of two hosts.](https://raw.githubusercontent.com/gocircuit/circuit/master/misc/img/servers.png) +![A circuit system of two hosts.](img/servers.png) You can join any number of additional hosts to the circuit environment in a similar fashion, even billions. The circuit uses a modern [expander @@ -213,7 +213,7 @@ Clients (the tool or your own) _dial into_ a circuit server in order to interact with the entire system. All servers are equal citizens in every respect and, in particular, any one can be used as a choice for dial-in. -![Circuit client connected to a server](https://raw.githubusercontent.com/gocircuit/circuit/master/misc/img/client.png) +![Circuit client connected to a server](img/client.png) The tool (described in more detail later) is essentially a set of commands that allow you to traverse the global hierarchical namespace of circuit elements, @@ -231,7 +231,7 @@ So, you might get something like this in response The two root-level anchors correspond to the two circuit servers. -![Circuit servers correspond to root-level anchors](https://raw.githubusercontent.com/gocircuit/circuit/master/misc/img/serveranchor.png) +![Circuit servers correspond to root-level anchors](img/serveranchor.png) ### Pointing the tool to your circuit cluster ### @@ -287,7 +287,7 @@ Run a new `ls` process: } EOF -![Process elements execute OS processes on behalf of the user](https://raw.githubusercontent.com/gocircuit/circuit/master/misc/img/mkproc.png) +![Process elements execute OS processes on behalf of the user](img/mkproc.png) See what happened: @@ -335,7 +335,7 @@ To create and execute a new docker container, using the tool: Most of these fields can be omitted analogously to their command-line option counterparts of the `docker` command-line tool. -![Docker elements are like processes](https://raw.githubusercontent.com/gocircuit/circuit/master/misc/img/mkdkr.png) +![Docker elements are like processes](img/mkdkr.png) The remaining docker element commands are identical to those for processes: `stdin`, `stdout`, `stderr`, `peek` and `wait`. In one exception, `peek` will return @@ -357,7 +357,7 @@ let's create a channel on `X88550014d4c82e4d`: The last argument of this line is the channel buffer capacity, analogously to the way channels are created in Go. -![Channel elements reside in the memory of a circuit server](https://raw.githubusercontent.com/gocircuit/circuit/master/misc/img/mkchan.png) +![Channel elements reside in the memory of a circuit server](img/mkchan.png) Verify the channel was created: From f3cf4e2f82e79bf596701e5efdbd38ad63a29937 Mon Sep 17 00:00:00 2001 From: hoijui Date: Sun, 21 Apr 2019 20:39:33 +0200 Subject: [PATCH 07/28] use `syscall.Dup3` on "!windows,arm" and Dup2 on other archs [fix] On windows, we use totally different code, not using any `syscall.Dup*` calls. --- kit/debug/sigpanic_save_panic_trace.go | 3 +-- kit/debug/syscall_wrapper.go | 15 +++++++++++++++ kit/debug/syscall_wrapper_arm.go | 15 +++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 kit/debug/syscall_wrapper.go create mode 100644 kit/debug/syscall_wrapper_arm.go diff --git a/kit/debug/sigpanic_save_panic_trace.go b/kit/debug/sigpanic_save_panic_trace.go index 6fa3218..9776e12 100644 --- a/kit/debug/sigpanic_save_panic_trace.go +++ b/kit/debug/sigpanic_save_panic_trace.go @@ -12,7 +12,6 @@ package debug import ( "fmt" "os" - "syscall" ) func SavePanicTrace() { @@ -25,7 +24,7 @@ func SavePanicTrace() { if err != nil { panic("dumper (no file) " + r.(fmt.Stringer).String()) } - syscall.Dup3(int(file.Fd()), int(os.Stderr.Fd()), 0) + Dup2(int(file.Fd()), int(os.Stderr.Fd())) // TRY: defer func() { file.Close() }() panic("dumper " + r.(string)) } diff --git a/kit/debug/syscall_wrapper.go b/kit/debug/syscall_wrapper.go new file mode 100644 index 0000000..aaf551e --- /dev/null +++ b/kit/debug/syscall_wrapper.go @@ -0,0 +1,15 @@ +// +build !windows,!arm +// Copyright 2019 Tumblr, Inc. +// Use of this source code is governed by the license for +// The Go Circuit Project, found in the LICENSE file. + +// Package debug implements debugging utilities +package debug + +import ( + "syscall" +) + +func Dup2(oldfd int, newfd int) { + syscall.Dup2(oldfd, newfd) +} diff --git a/kit/debug/syscall_wrapper_arm.go b/kit/debug/syscall_wrapper_arm.go new file mode 100644 index 0000000..0608481 --- /dev/null +++ b/kit/debug/syscall_wrapper_arm.go @@ -0,0 +1,15 @@ +// +build !windows,arm +// Copyright 2019 Tumblr, Inc. +// Use of this source code is governed by the license for +// The Go Circuit Project, found in the LICENSE file. + +// Package debug implements debugging utilities +package debug + +import ( + "syscall" +) + +func Dup2(oldfd int, newfd int) { + syscall.Dup3(oldfd, newfd, 0) +} From eb42e2d7bafbdc84206a7d965c8ca9fed9467437 Mon Sep 17 00:00:00 2001 From: hoijui Date: Sun, 21 Apr 2019 21:18:01 +0200 Subject: [PATCH 08/28] `syscall.Dup*`: also support ARM64 [fix] --- kit/debug/syscall_wrapper.go | 5 ++++- kit/debug/syscall_wrapper_arm.go | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/kit/debug/syscall_wrapper.go b/kit/debug/syscall_wrapper.go index aaf551e..dd739cc 100644 --- a/kit/debug/syscall_wrapper.go +++ b/kit/debug/syscall_wrapper.go @@ -1,4 +1,7 @@ -// +build !windows,!arm +// +build !windows +// +build !arm +// +build !arm64 + // Copyright 2019 Tumblr, Inc. // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. diff --git a/kit/debug/syscall_wrapper_arm.go b/kit/debug/syscall_wrapper_arm.go index 0608481..e2977b0 100644 --- a/kit/debug/syscall_wrapper_arm.go +++ b/kit/debug/syscall_wrapper_arm.go @@ -1,4 +1,6 @@ -// +build !windows,arm +// +build !windows +// +build arm arm64 + // Copyright 2019 Tumblr, Inc. // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. From 06345d09c2fff09e260111a1ca892c5660417e38 Mon Sep 17 00:00:00 2001 From: hoijui Date: Fri, 17 May 2019 12:23:35 +0200 Subject: [PATCH 09/28] Travis-CI: compile on Linux, OSX & Cross-compile for Windows (on Linux) --- .travis.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 50fe7f1..7beea74 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,21 @@ language: go +sudo: false +# Allow use in forks go_import_path: github.com/gocircuit/circuit -before_install: -- go get -v github.com/pkg/errors github.com/urfave/cli +matrix: + include: + - go: 1.12.x + os: linux + - go: 1.11.x + os: osx + - name: Cross-Compile for windows (from Linux) + go: 1.11.x + os: linux + env: GOOS=windows GOARCH=amd64 CGO_ENABLED=0 -go: -- tip +install: +- go get -v github.com/pkg/errors +- go get -v github.com/urfave/cli From fae3da1ea5f485cb0b55c0b663625f17f0783eeb Mon Sep 17 00:00:00 2001 From: hoijui Date: Mon, 27 Apr 2020 08:13:08 +0200 Subject: [PATCH 10/28] README: fix typo in link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 00ce839..8bfcffa 100644 --- a/README.md +++ b/README.md @@ -267,7 +267,7 @@ A list of available tool commands is shown on the help screen circuit help A more detailed explanation of their meaning and function can be found -in the documentation of the client package, `github.com/gocircuit/client`. +in the documentation of the client package, `github.com/gocircuit/circuit/client`. ### Example: Make a process ### From 3dd1296537c6ef3bd76a8966c765cd5dff2e161e Mon Sep 17 00:00:00 2001 From: hoijui Date: Mon, 27 Apr 2020 08:25:42 +0200 Subject: [PATCH 11/28] change project URL from gocircuit to hoijui * github.com/gocircuit/circuit -> github.com/hoijui/circuit --- .travis.yml | 2 +- README.md | 24 +++++++++---------- anchor/term.go | 16 ++++++------- anchor/x.go | 16 ++++++------- client/chan.go | 2 +- client/client.go | 20 ++++++++-------- client/dns.go | 2 +- client/proc.go | 2 +- client/server.go | 2 +- client/subscription.go | 2 +- client/term.go | 20 ++++++++-------- cmd/circuit/chan.go | 2 +- cmd/circuit/dns.go | 2 +- cmd/circuit/load.go | 12 +++++----- cmd/circuit/load_windows.go | 10 ++++---- cmd/circuit/ls.go | 4 ++-- cmd/circuit/peek.go | 4 ++-- cmd/circuit/procdkr.go | 4 ++-- cmd/circuit/recv.go | 2 +- cmd/circuit/server.go | 4 ++-- cmd/circuit/start.go | 12 +++++----- cmd/circuit/util.go | 2 +- cmd/circuit/wait.go | 4 ++-- element/_mesos/mesos.go | 2 +- element/dns/_m.go | 2 +- element/dns/dns.go | 4 ++-- element/dns/x.go | 4 ++-- element/docker/_docker_test.go | 2 +- element/docker/docker.go | 10 ++++---- element/docker/x.go | 8 +++---- element/proc/proc.go | 4 ++-- element/proc/x.go | 6 ++--- element/server/srv.go | 8 +++---- element/server/x.go | 6 ++--- element/valve/ops.go | 2 +- element/valve/valve.go | 2 +- element/valve/x.go | 6 ++--- gocircuit.org/api/anchor.go | 2 +- gocircuit.org/api/api.go | 4 ++-- gocircuit.org/api/channel.go | 2 +- gocircuit.org/api/connect.go | 4 ++-- gocircuit.org/api/container.go | 4 ++-- gocircuit.org/api/name.go | 2 +- gocircuit.org/api/process.go | 2 +- gocircuit.org/api/server.go | 2 +- gocircuit.org/api/subscription.go | 2 +- gocircuit.org/build/index.go | 8 +++---- gocircuit.org/build/main.go | 6 ++--- gocircuit.org/man/cmd.go | 4 ++-- gocircuit.org/man/element-channel.go | 2 +- gocircuit.org/man/element-container.go | 2 +- gocircuit.org/man/element-dns.go | 2 +- gocircuit.org/man/element-process.go | 4 ++-- gocircuit.org/man/element-server.go | 2 +- gocircuit.org/man/element-subscription.go | 2 +- gocircuit.org/man/history.go | 2 +- gocircuit.org/man/install.go | 4 ++-- gocircuit.org/man/metaphor.go | 2 +- gocircuit.org/man/run.go | 2 +- gocircuit.org/man/security.go | 2 +- gocircuit.org/tutorial/mysql-nodejs/app.go | 8 +++---- gocircuit.org/tutorial/mysql-nodejs/boot.go | 4 ++-- gocircuit.org/tutorial/mysql-nodejs/image.go | 6 ++--- .../tutorial/mysql-nodejs/overview.go | 2 +- gocircuit.org/tutorial/mysql-nodejs/run.go | 4 ++-- kit/assemble/assemble.go | 6 ++--- kit/assemble/dialback.go | 4 ++-- kit/assemble/discover_test.go | 2 +- kit/assemble/gather.go | 2 +- kit/assemble/lens.go | 2 +- kit/assemble/scatter.go | 2 +- kit/debug/ctrlc/init.go | 2 +- kit/debug/kill/init.go | 2 +- kit/iomisc/sniffer.go | 2 +- kit/posix/shell.go | 2 +- kit/pubsub/pubsub.go | 2 +- kit/shell/shell.go | 8 +++---- kit/tele/blend/_blend_test.go | 12 +++++----- kit/tele/blend/_close_test.go | 12 +++++----- kit/tele/blend/dialer.go | 4 ++-- kit/tele/blend/listener.go | 4 ++-- kit/tele/blend/session.go | 4 ++-- kit/tele/blend/transport.go | 4 ++-- kit/tele/codec/_codec_test.go | 10 ++++---- kit/tele/hmac/codec.go | 4 ++-- kit/tele/tcp/codec.go | 4 ++-- kit/tele/tele.go | 10 ++++---- kit/x/exec/exec.go | 8 +++---- kit/x/file/file.go | 4 ++-- kit/x/io/io.go | 4 ++-- misc/docker/build.sh | 2 +- misc/vagrant/.bash_profile | 8 +++---- sys/acid/acid.go | 4 ++-- sys/acid/behalf.go | 2 +- sys/lang/_runtime_test.go | 4 ++-- sys/lang/call.go | 2 +- sys/lang/dial.go | 6 ++--- sys/lang/doc.go | 2 +- sys/lang/exp.go | 6 ++--- sys/lang/freeze_test.go | 2 +- sys/lang/func.go | 10 ++++---- sys/lang/imp.go | 6 ++--- sys/lang/lang.go | 6 ++--- sys/lang/msg.go | 6 ++--- sys/lang/prof/profile.go | 2 +- sys/lang/ptrptr.go | 4 ++-- sys/lang/readwriter.go | 2 +- sys/lang/runtime.go | 10 ++++---- sys/lang/sandbox.go | 2 +- sys/lang/value.go | 2 +- sys/lang/vexp.go | 2 +- sys/lang/vimp.go | 2 +- sys/tele/_tele_test.go | 2 +- sys/tele/addr.go | 4 ++-- sys/tele/conn.go | 4 ++-- sys/tele/dialer.go | 6 ++--- sys/tele/listener.go | 6 ++--- sys/tele/transport.go | 6 ++--- tissue/folk.go | 2 +- tissue/kin.go | 6 ++--- tissue/locus/locus.go | 12 +++++----- tissue/locus/peer.go | 6 ++--- tissue/locus/x.go | 2 +- tissue/neighborhood.go | 2 +- tissue/tube/tube.go | 8 +++---- tissue/tube/view.go | 2 +- tissue/tube/x.go | 4 ++-- tissue/util.go | 4 ++-- tutorial/nodejs-using-mysql/start-app/main.go | 2 +- tutorial/wait-all/main.go | 2 +- tutorial/wait-first/main.go | 2 +- tutorial/watchbot-with-chan/main.go | 2 +- tutorial/watchbot/main.go | 2 +- use/anchorfs/anchorfs.go | 4 ++-- use/anchorfs/module.go | 2 +- use/circuit/lang.go | 2 +- use/circuit/module.go | 8 +++---- use/circuit/runtime.go | 4 ++-- use/n/id.go | 2 +- use/n/module.go | 2 +- use/worker/worker.go | 4 ++-- 141 files changed, 327 insertions(+), 327 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7beea74..31c2490 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: go sudo: false # Allow use in forks -go_import_path: github.com/gocircuit/circuit +go_import_path: github.com/hoijui/circuit matrix: include: diff --git a/README.md b/README.md index 8bfcffa..a63eb6b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Circuit -[![Build Status](https://travis-ci.org/gocircuit/circuit.svg?branch=master)](https://travis-ci.org/gocircuit/circuit) -[![GoDoc](https://godoc.org/github.com/gocircuit/circuit?status.png)](https://godoc.org/github.com/gocircuit/circuit) +[![Build Status](https://travis-ci.org/hoijui/circuit.svg?branch=master)](https://travis-ci.org/hoijui/circuit) +[![GoDoc](https://godoc.org/github.com/hoijui/circuit?status.png)](https://godoc.org/github.com/hoijui/circuit) ![Engineering role separation.](img/3.png) @@ -62,7 +62,7 @@ programs in the [CSP](http://en.wikipedia.org/wiki/Communicating_sequential_proc which allows engineers to encode complex dynamic response behavior, spanning multiple data centers. Find comparisons to other technologies—like Zookeeper, etcd, CoreOS, raft, Consul, Puppet, Chef, and -so forth—in [the wiki](https://github.com/gocircuit/circuit/wiki). +so forth—in [the wiki](https://github.com/hoijui/circuit/wiki). ## Incomparable but related works @@ -100,7 +100,7 @@ Since this video was recorded, the API-via-file-system approach was abandoned in favor of a simpler command-line tool and a Go client library. Also take a look at the [faux animated illustration](https://docs.google.com/presentation/d/1nazPJAmYeIvJam9oiA-6euEz3Bo9flRLqsgRU7QAlr0/edit?usp=sharing) -of the [Advanced Tutorial: Watchbot with a back channel](https://github.com/gocircuit/circuit/tree/master/tutorial/watchbot-with-chan). +of the [Advanced Tutorial: Watchbot with a back channel](https://github.com/hoijui/circuit/tree/master/tutorial/watchbot-with-chan). The circuit is a tool for executing and synchronizing UNIX processes across entire clusters by means of a command-line tool and a client library. @@ -115,7 +115,7 @@ The Circuit comprises one small binary. It can be built for Linux and Darwin. Given that the [Go Language](http://golang.org) compiler is [installed](http://golang.org/doc/install), you can build and install the circuit binary with one line: - go get github.com/gocircuit/circuit/cmd/circuit + go get github.com/hoijui/circuit/cmd/circuit ## Run the servers @@ -206,7 +206,7 @@ their anchor. Once the circuit servers are started, you can create, observe and control circuit elements (i) interactively—using the circuit binary which doubles as a command-line client—as -well as (ii) programmatically—using the circuit Go client package `github.com/gocircuit/circuit/client`. +well as (ii) programmatically—using the circuit Go client package `github.com/hoijui/circuit/client`. In fact, the circuit command-line tool is simply a front-end for the Go client library. Clients (the tool or your own) _dial into_ a circuit server in order to @@ -267,7 +267,7 @@ A list of available tool commands is shown on the help screen circuit help A more detailed explanation of their meaning and function can be found -in the documentation of the client package, `github.com/gocircuit/circuit/client`. +in the documentation of the client package, `github.com/hoijui/circuit/client`. ### Example: Make a process ### @@ -478,11 +478,11 @@ Take a look, for instance, at the two “watchbot” tutorials which demonstrate how to implement a semi-resilient self-sustained mechanism within a cluster. Find the simpler one here - https://github.com/gocircuit/circuit/tree/master/tutorial/watchbot + https://github.com/hoijui/circuit/tree/master/tutorial/watchbot And the more elaborate one, which demonstrate use of channels, here - https://github.com/gocircuit/circuit/tree/master/tutorial/watchbot-with-chan + https://github.com/hoijui/circuit/tree/master/tutorial/watchbot-with-chan ## Security ## @@ -523,20 +523,20 @@ Ask questions to [The Circuit User Group](https://groups.google.com/forum/#!foru The Go client for writing circuit apps is package - github.com/gocircuit/circuit/client + github.com/hoijui/circuit/client The public interface of this package is self-contained. Other packages in the circuit repo are internal. Tutorials can be found within the client package directory - github.com/gocircuit/circuit/client/tutorial + github.com/hoijui/circuit/client/tutorial Additionally, the circuit binary directory contains the implementation of the circuit tool, which is itself built using the client and is another comprehensive example of a circuit app. It can be found in - github.com/gocircuit/circuit/cmd/circuit + github.com/hoijui/circuit/cmd/circuit To stay up to date with new developments, documentation and articles, follow The Circuit Project on Twitter [@gocircuit](https://twitter.com/gocircuit) or diff --git a/anchor/term.go b/anchor/term.go index 3239422..cec48cc 100644 --- a/anchor/term.go +++ b/anchor/term.go @@ -12,14 +12,14 @@ import ( "io" "log" - ds "github.com/gocircuit/circuit/client/docker" - "github.com/gocircuit/circuit/element/dns" - "github.com/gocircuit/circuit/element/docker" - "github.com/gocircuit/circuit/element/proc" - srv "github.com/gocircuit/circuit/element/server" - "github.com/gocircuit/circuit/element/valve" - "github.com/gocircuit/circuit/kit/pubsub" - "github.com/gocircuit/circuit/use/circuit" + ds "github.com/hoijui/circuit/client/docker" + "github.com/hoijui/circuit/element/dns" + "github.com/hoijui/circuit/element/docker" + "github.com/hoijui/circuit/element/proc" + srv "github.com/hoijui/circuit/element/server" + "github.com/hoijui/circuit/element/valve" + "github.com/hoijui/circuit/kit/pubsub" + "github.com/hoijui/circuit/use/circuit" ) type Element interface { diff --git a/anchor/x.go b/anchor/x.go index cd1b812..16c625b 100644 --- a/anchor/x.go +++ b/anchor/x.go @@ -10,14 +10,14 @@ package anchor import ( "errors" - srv "github.com/gocircuit/circuit/element/server" - "github.com/gocircuit/circuit/element/proc" - "github.com/gocircuit/circuit/element/docker" - "github.com/gocircuit/circuit/element/valve" - "github.com/gocircuit/circuit/element/dns" - "github.com/gocircuit/circuit/kit/pubsub" - "github.com/gocircuit/circuit/use/circuit" - xerrors "github.com/gocircuit/circuit/use/errors" + srv "github.com/hoijui/circuit/element/server" + "github.com/hoijui/circuit/element/proc" + "github.com/hoijui/circuit/element/docker" + "github.com/hoijui/circuit/element/valve" + "github.com/hoijui/circuit/element/dns" + "github.com/hoijui/circuit/kit/pubsub" + "github.com/hoijui/circuit/use/circuit" + xerrors "github.com/hoijui/circuit/use/errors" ) func init() { diff --git a/client/chan.go b/client/chan.go index b1adadf..be3e0da 100644 --- a/client/chan.go +++ b/client/chan.go @@ -10,7 +10,7 @@ package client import ( "io" - "github.com/gocircuit/circuit/element/valve" + "github.com/hoijui/circuit/element/valve" ) // Chan provides access to a circuit channel element. diff --git a/client/client.go b/client/client.go index fb5d72a..c5615dc 100644 --- a/client/client.go +++ b/client/client.go @@ -17,16 +17,16 @@ import ( "sync" "time" - "github.com/gocircuit/circuit/anchor" - "github.com/gocircuit/circuit/client/docker" - "github.com/gocircuit/circuit/kit/assemble" - _ "github.com/gocircuit/circuit/kit/debug/kill" - "github.com/gocircuit/circuit/sys/lang" - _ "github.com/gocircuit/circuit/sys/tele" - "github.com/gocircuit/circuit/tissue" - "github.com/gocircuit/circuit/tissue/locus" - "github.com/gocircuit/circuit/use/circuit" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/anchor" + "github.com/hoijui/circuit/client/docker" + "github.com/hoijui/circuit/kit/assemble" + _ "github.com/hoijui/circuit/kit/debug/kill" + "github.com/hoijui/circuit/sys/lang" + _ "github.com/hoijui/circuit/sys/tele" + "github.com/hoijui/circuit/tissue" + "github.com/hoijui/circuit/tissue/locus" + "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/use/n" ) var _once sync.Once diff --git a/client/dns.go b/client/dns.go index b917c77..2715b6a 100644 --- a/client/dns.go +++ b/client/dns.go @@ -8,7 +8,7 @@ package client import ( - "github.com/gocircuit/circuit/element/dns" + "github.com/hoijui/circuit/element/dns" ) // NameserverStat encloses process state information. diff --git a/client/proc.go b/client/proc.go index 70e9262..eba3402 100644 --- a/client/proc.go +++ b/client/proc.go @@ -10,7 +10,7 @@ package client import ( "io" - "github.com/gocircuit/circuit/element/proc" + "github.com/hoijui/circuit/element/proc" ) // Cmd describes the execution parameters for an OS process. diff --git a/client/server.go b/client/server.go index bb1c009..3f1602c 100644 --- a/client/server.go +++ b/client/server.go @@ -11,7 +11,7 @@ import ( "io" "time" - srv "github.com/gocircuit/circuit/element/server" + srv "github.com/hoijui/circuit/element/server" ) // ServerStat encloses subscription state information. diff --git a/client/subscription.go b/client/subscription.go index 654507a..0b25dc9 100644 --- a/client/subscription.go +++ b/client/subscription.go @@ -8,7 +8,7 @@ package client import ( - "github.com/gocircuit/circuit/kit/pubsub" + "github.com/hoijui/circuit/kit/pubsub" ) // SubscriptionStat encloses subscription state information. diff --git a/client/term.go b/client/term.go index ed2d42c..a8adf56 100644 --- a/client/term.go +++ b/client/term.go @@ -10,16 +10,16 @@ package client import ( // "fmt" - "github.com/gocircuit/circuit/anchor" - "github.com/gocircuit/circuit/element/dns" - "github.com/gocircuit/circuit/element/proc" - srv "github.com/gocircuit/circuit/element/server" - "github.com/gocircuit/circuit/element/valve" - "github.com/gocircuit/circuit/kit/pubsub" - "github.com/gocircuit/circuit/tissue" - - cdocker "github.com/gocircuit/circuit/client/docker" - edocker "github.com/gocircuit/circuit/element/docker" + "github.com/hoijui/circuit/anchor" + "github.com/hoijui/circuit/element/dns" + "github.com/hoijui/circuit/element/proc" + srv "github.com/hoijui/circuit/element/server" + "github.com/hoijui/circuit/element/valve" + "github.com/hoijui/circuit/kit/pubsub" + "github.com/hoijui/circuit/tissue" + + cdocker "github.com/hoijui/circuit/client/docker" + edocker "github.com/hoijui/circuit/element/docker" ) // An Anchor represents a location in the global anchor namespace of a circuit diff --git a/cmd/circuit/chan.go b/cmd/circuit/chan.go index ba2368e..02b52b8 100644 --- a/cmd/circuit/chan.go +++ b/cmd/circuit/chan.go @@ -13,7 +13,7 @@ import ( "os" "strconv" - "github.com/gocircuit/circuit/client" + "github.com/hoijui/circuit/client" "github.com/pkg/errors" "github.com/urfave/cli" diff --git a/cmd/circuit/dns.go b/cmd/circuit/dns.go index 8aad909..6724a3d 100644 --- a/cmd/circuit/dns.go +++ b/cmd/circuit/dns.go @@ -8,7 +8,7 @@ package main import ( - "github.com/gocircuit/circuit/client" + "github.com/hoijui/circuit/client" "github.com/pkg/errors" "github.com/urfave/cli" diff --git a/cmd/circuit/load.go b/cmd/circuit/load.go index b41dff8..ac4c9e1 100644 --- a/cmd/circuit/load.go +++ b/cmd/circuit/load.go @@ -19,12 +19,12 @@ import ( "strings" "time" - _ "github.com/gocircuit/circuit/kit/debug/kill" - "github.com/gocircuit/circuit/kit/lockfile" - "github.com/gocircuit/circuit/sys/lang" - _ "github.com/gocircuit/circuit/sys/tele" - "github.com/gocircuit/circuit/use/circuit" - "github.com/gocircuit/circuit/use/n" + _ "github.com/hoijui/circuit/kit/debug/kill" + "github.com/hoijui/circuit/kit/lockfile" + "github.com/hoijui/circuit/sys/lang" + _ "github.com/hoijui/circuit/sys/tele" + "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/use/n" ) func load(addr *net.TCPAddr, vardir string, key []byte) n.Addr { diff --git a/cmd/circuit/load_windows.go b/cmd/circuit/load_windows.go index 79faac5..d2ee782 100644 --- a/cmd/circuit/load_windows.go +++ b/cmd/circuit/load_windows.go @@ -18,11 +18,11 @@ import ( "strings" "time" - _ "github.com/gocircuit/circuit/kit/debug/kill" - "github.com/gocircuit/circuit/sys/lang" - _ "github.com/gocircuit/circuit/sys/tele" - "github.com/gocircuit/circuit/use/circuit" - "github.com/gocircuit/circuit/use/n" + _ "github.com/hoijui/circuit/kit/debug/kill" + "github.com/hoijui/circuit/sys/lang" + _ "github.com/hoijui/circuit/sys/tele" + "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/use/n" ) func load(addr *net.TCPAddr, vardir string, key []byte) n.Addr { diff --git a/cmd/circuit/ls.go b/cmd/circuit/ls.go index 0a7723e..70b2ead 100644 --- a/cmd/circuit/ls.go +++ b/cmd/circuit/ls.go @@ -13,8 +13,8 @@ import ( "sort" "strings" - "github.com/gocircuit/circuit/client" - "github.com/gocircuit/circuit/client/docker" + "github.com/hoijui/circuit/client" + "github.com/hoijui/circuit/client/docker" "github.com/pkg/errors" "github.com/urfave/cli" ) diff --git a/cmd/circuit/peek.go b/cmd/circuit/peek.go index 5ef38a3..d8a1b77 100644 --- a/cmd/circuit/peek.go +++ b/cmd/circuit/peek.go @@ -11,8 +11,8 @@ import ( "encoding/json" "fmt" - "github.com/gocircuit/circuit/client" - "github.com/gocircuit/circuit/client/docker" + "github.com/hoijui/circuit/client" + "github.com/hoijui/circuit/client/docker" "github.com/pkg/errors" "github.com/urfave/cli" diff --git a/cmd/circuit/procdkr.go b/cmd/circuit/procdkr.go index d57fa75..bb81a33 100644 --- a/cmd/circuit/procdkr.go +++ b/cmd/circuit/procdkr.go @@ -13,8 +13,8 @@ import ( "io/ioutil" "os" - "github.com/gocircuit/circuit/client" - "github.com/gocircuit/circuit/client/docker" + "github.com/hoijui/circuit/client" + "github.com/hoijui/circuit/client/docker" "github.com/pkg/errors" "github.com/urfave/cli" diff --git a/cmd/circuit/recv.go b/cmd/circuit/recv.go index 092966f..f99c16c 100644 --- a/cmd/circuit/recv.go +++ b/cmd/circuit/recv.go @@ -12,7 +12,7 @@ import ( "io" "os" - "github.com/gocircuit/circuit/client" + "github.com/hoijui/circuit/client" "github.com/pkg/errors" "github.com/urfave/cli" diff --git a/cmd/circuit/server.go b/cmd/circuit/server.go index a468b00..8675bce 100644 --- a/cmd/circuit/server.go +++ b/cmd/circuit/server.go @@ -8,13 +8,13 @@ package main import ( - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/use/n" "github.com/pkg/errors" // "bytes" "io" "os" - "github.com/gocircuit/circuit/client" + "github.com/hoijui/circuit/client" "github.com/urfave/cli" ) diff --git a/cmd/circuit/start.go b/cmd/circuit/start.go index 38fd38f..81af4e1 100644 --- a/cmd/circuit/start.go +++ b/cmd/circuit/start.go @@ -15,12 +15,12 @@ import ( "os" "path" - "github.com/gocircuit/circuit/element/docker" - "github.com/gocircuit/circuit/kit/assemble" - "github.com/gocircuit/circuit/tissue" - "github.com/gocircuit/circuit/tissue/locus" - "github.com/gocircuit/circuit/use/circuit" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/element/docker" + "github.com/hoijui/circuit/kit/assemble" + "github.com/hoijui/circuit/tissue" + "github.com/hoijui/circuit/tissue/locus" + "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/use/n" "github.com/pkg/errors" "github.com/urfave/cli" diff --git a/cmd/circuit/util.go b/cmd/circuit/util.go index 02f0c05..625c231 100644 --- a/cmd/circuit/util.go +++ b/cmd/circuit/util.go @@ -14,7 +14,7 @@ import ( "os" "strings" - "github.com/gocircuit/circuit/client" + "github.com/hoijui/circuit/client" "github.com/urfave/cli" ) diff --git a/cmd/circuit/wait.go b/cmd/circuit/wait.go index 725b47e..f0010bf 100644 --- a/cmd/circuit/wait.go +++ b/cmd/circuit/wait.go @@ -12,8 +12,8 @@ import ( "log" "os" - "github.com/gocircuit/circuit/client" - "github.com/gocircuit/circuit/client/docker" + "github.com/hoijui/circuit/client" + "github.com/hoijui/circuit/client/docker" "github.com/pkg/errors" "github.com/urfave/cli" ) diff --git a/element/_mesos/mesos.go b/element/_mesos/mesos.go index ba150b9..fd4d304 100644 --- a/element/_mesos/mesos.go +++ b/element/_mesos/mesos.go @@ -13,7 +13,7 @@ import ( "io" "sync" - "github.com/gocircuit/circuit/use/circuit" + "github.com/hoijui/circuit/use/circuit" ) type Resource map[string]int // resource name => number of units diff --git a/element/dns/_m.go b/element/dns/_m.go index 0293b9e..a9320f0 100644 --- a/element/dns/_m.go +++ b/element/dns/_m.go @@ -6,7 +6,7 @@ import ( "net" // "time" - . "github.com/gocircuit/circuit/github.com/miekg/dns" + . "github.com/hoijui/circuit/github.com/miekg/dns" ) func Filter(w ResponseWriter, req *Msg) { diff --git a/element/dns/dns.go b/element/dns/dns.go index 3a97a36..60354f2 100644 --- a/element/dns/dns.go +++ b/element/dns/dns.go @@ -11,8 +11,8 @@ import ( "net" "sync" - "github.com/gocircuit/circuit/github.com/miekg/dns" - "github.com/gocircuit/circuit/use/circuit" + "github.com/hoijui/circuit/github.com/miekg/dns" + "github.com/hoijui/circuit/use/circuit" ) type Nameserver interface { diff --git a/element/dns/x.go b/element/dns/x.go index 7e550b0..dbacb40 100644 --- a/element/dns/x.go +++ b/element/dns/x.go @@ -8,8 +8,8 @@ package dns import ( - "github.com/gocircuit/circuit/use/circuit" - "github.com/gocircuit/circuit/use/errors" + "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/use/errors" ) func init() { diff --git a/element/docker/_docker_test.go b/element/docker/_docker_test.go index 85a7650..818d56d 100644 --- a/element/docker/_docker_test.go +++ b/element/docker/_docker_test.go @@ -11,7 +11,7 @@ import ( "fmt" "testing" - ds "github.com/gocircuit/circuit/client/docker" + ds "github.com/hoijui/circuit/client/docker" ) func TestDocker(t *testing.T) { diff --git a/element/docker/docker.go b/element/docker/docker.go index f27a176..573cedf 100644 --- a/element/docker/docker.go +++ b/element/docker/docker.go @@ -13,11 +13,11 @@ import ( "os/exec" "runtime" - "github.com/gocircuit/circuit/element/proc" - "github.com/gocircuit/circuit/kit/interruptible" - "github.com/gocircuit/circuit/kit/lang" - "github.com/gocircuit/circuit/use/circuit" - ds "github.com/gocircuit/circuit/client/docker" + "github.com/hoijui/circuit/element/proc" + "github.com/hoijui/circuit/kit/interruptible" + "github.com/hoijui/circuit/kit/lang" + "github.com/hoijui/circuit/use/circuit" + ds "github.com/hoijui/circuit/client/docker" ) type Container interface { diff --git a/element/docker/x.go b/element/docker/x.go index 5bddd9f..075cdbe 100644 --- a/element/docker/x.go +++ b/element/docker/x.go @@ -10,10 +10,10 @@ package docker import ( "io" - xio "github.com/gocircuit/circuit/kit/x/io" - "github.com/gocircuit/circuit/use/circuit" - "github.com/gocircuit/circuit/use/errors" - ds "github.com/gocircuit/circuit/client/docker" + xio "github.com/hoijui/circuit/kit/x/io" + "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/use/errors" + ds "github.com/hoijui/circuit/client/docker" ) func init() { diff --git a/element/proc/proc.go b/element/proc/proc.go index 0ed6d95..fc41a30 100644 --- a/element/proc/proc.go +++ b/element/proc/proc.go @@ -17,8 +17,8 @@ import ( "sync" "syscall" - "github.com/gocircuit/circuit/kit/interruptible" - "github.com/gocircuit/circuit/use/circuit" + "github.com/hoijui/circuit/kit/interruptible" + "github.com/hoijui/circuit/use/circuit" ) type Proc interface { diff --git a/element/proc/x.go b/element/proc/x.go index 5c1950a..0cc9097 100644 --- a/element/proc/x.go +++ b/element/proc/x.go @@ -10,9 +10,9 @@ package proc import ( "io" - xio "github.com/gocircuit/circuit/kit/x/io" - "github.com/gocircuit/circuit/use/circuit" - "github.com/gocircuit/circuit/use/errors" + xio "github.com/hoijui/circuit/kit/x/io" + "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/use/errors" ) func init() { diff --git a/element/server/srv.go b/element/server/srv.go index c925ea1..651a75a 100644 --- a/element/server/srv.go +++ b/element/server/srv.go @@ -14,10 +14,10 @@ import ( "runtime/pprof" "time" - "github.com/gocircuit/circuit/kit/interruptible" - "github.com/gocircuit/circuit/tissue" - "github.com/gocircuit/circuit/use/circuit" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/kit/interruptible" + "github.com/hoijui/circuit/tissue" + "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/use/n" ) type Server interface { diff --git a/element/server/x.go b/element/server/x.go index 3f81ca4..ce0a3f1 100644 --- a/element/server/x.go +++ b/element/server/x.go @@ -11,9 +11,9 @@ import ( // "fmt" "io" - xio "github.com/gocircuit/circuit/kit/x/io" - "github.com/gocircuit/circuit/use/circuit" - "github.com/gocircuit/circuit/use/errors" + xio "github.com/hoijui/circuit/kit/x/io" + "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/use/errors" ) func init() { diff --git a/element/valve/ops.go b/element/valve/ops.go index 721ba9b..d0a5e17 100644 --- a/element/valve/ops.go +++ b/element/valve/ops.go @@ -11,7 +11,7 @@ import ( "errors" "io" - "github.com/gocircuit/circuit/kit/interruptible" + "github.com/hoijui/circuit/kit/interruptible" ) // Send … diff --git a/element/valve/valve.go b/element/valve/valve.go index 57e82a9..faeba39 100644 --- a/element/valve/valve.go +++ b/element/valve/valve.go @@ -12,7 +12,7 @@ import ( "io" "sync" - "github.com/gocircuit/circuit/use/circuit" + "github.com/hoijui/circuit/use/circuit" ) type Valve interface { diff --git a/element/valve/x.go b/element/valve/x.go index e00462e..550f5e8 100644 --- a/element/valve/x.go +++ b/element/valve/x.go @@ -10,9 +10,9 @@ package valve import ( "io" - xio "github.com/gocircuit/circuit/kit/x/io" - "github.com/gocircuit/circuit/use/circuit" - "github.com/gocircuit/circuit/use/errors" + xio "github.com/hoijui/circuit/kit/x/io" + "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/use/errors" ) func init() { diff --git a/gocircuit.org/api/anchor.go b/gocircuit.org/api/anchor.go index 8d3dd1d..0d7111c 100644 --- a/gocircuit.org/api/anchor.go +++ b/gocircuit.org/api/anchor.go @@ -1,7 +1,7 @@ package api import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderAnchorPage() string { diff --git a/gocircuit.org/api/api.go b/gocircuit.org/api/api.go index 620a6e2..ef0e943 100644 --- a/gocircuit.org/api/api.go +++ b/gocircuit.org/api/api.go @@ -1,7 +1,7 @@ package api import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderMainPage() string { @@ -22,7 +22,7 @@ const mainBody = `

To use the Go client API to the circuit, start by importing the client package:

-	import "github.com/gocircuit/circuit/client"
+	import "github.com/hoijui/circuit/client"
 

System abstraction

diff --git a/gocircuit.org/api/channel.go b/gocircuit.org/api/channel.go index 1adf9ff..aa69a74 100644 --- a/gocircuit.org/api/channel.go +++ b/gocircuit.org/api/channel.go @@ -1,7 +1,7 @@ package api import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderChannelPage() string { diff --git a/gocircuit.org/api/connect.go b/gocircuit.org/api/connect.go index f3e1207..307e466 100644 --- a/gocircuit.org/api/connect.go +++ b/gocircuit.org/api/connect.go @@ -1,7 +1,7 @@ package api import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderConnectPage() string { @@ -18,7 +18,7 @@ const connectBody = `

To use the Go client API to the circuit, start by importing the client package:

-	import "github.com/gocircuit/circuit/client"
+	import "github.com/hoijui/circuit/client"
 

The first step of every circuit client application is connecting to a circuit cluster. diff --git a/gocircuit.org/api/container.go b/gocircuit.org/api/container.go index f5e8970..121f4d4 100644 --- a/gocircuit.org/api/container.go +++ b/gocircuit.org/api/container.go @@ -1,7 +1,7 @@ package api import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderContainerPage() string { @@ -18,7 +18,7 @@ const containerBody = `

The container-related types and structures of the circuit API are in a dedicated package:

-	import "github.com/gocircuit/circuit/client/docker"
+	import "github.com/hoijui/circuit/client/docker"
 

Container element manipulations and semantics are exactly analogous to diff --git a/gocircuit.org/api/name.go b/gocircuit.org/api/name.go index bf6a544..d6b8484 100644 --- a/gocircuit.org/api/name.go +++ b/gocircuit.org/api/name.go @@ -1,7 +1,7 @@ package api import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderNamePage() string { diff --git a/gocircuit.org/api/process.go b/gocircuit.org/api/process.go index db8cac7..46fa4dc 100644 --- a/gocircuit.org/api/process.go +++ b/gocircuit.org/api/process.go @@ -1,7 +1,7 @@ package api import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderProcessPage() string { diff --git a/gocircuit.org/api/server.go b/gocircuit.org/api/server.go index 270a158..0df8a93 100644 --- a/gocircuit.org/api/server.go +++ b/gocircuit.org/api/server.go @@ -1,7 +1,7 @@ package api import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderServerPage() string { diff --git a/gocircuit.org/api/subscription.go b/gocircuit.org/api/subscription.go index 1ba8e36..b6da516 100644 --- a/gocircuit.org/api/subscription.go +++ b/gocircuit.org/api/subscription.go @@ -1,7 +1,7 @@ package api import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderSubscriptionPage() string { diff --git a/gocircuit.org/build/index.go b/gocircuit.org/build/index.go index b2b8bd4..b07d4ce 100644 --- a/gocircuit.org/build/index.go +++ b/gocircuit.org/build/index.go @@ -1,7 +1,7 @@ package main import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderIndexPage() string { @@ -32,10 +32,10 @@ can fail if the hardware hosting the system's own software fails.

Sources

-

  - +

  + -

Find the source repository for Circuit on GitHub. +

Find the source repository for Circuit on GitHub. Follow us on Twitter @gocircuit.

Submit issues to our GitHub repo. For discussions about using and developing diff --git a/gocircuit.org/build/main.go b/gocircuit.org/build/main.go index 921b90a..8805cb6 100644 --- a/gocircuit.org/build/main.go +++ b/gocircuit.org/build/main.go @@ -4,9 +4,9 @@ import ( "os" "path" - "github.com/gocircuit/circuit/gocircuit.org/api" - "github.com/gocircuit/circuit/gocircuit.org/man" - "github.com/gocircuit/circuit/gocircuit.org/tutorial/mysql-nodejs" + "github.com/hoijui/circuit/gocircuit.org/api" + "github.com/hoijui/circuit/gocircuit.org/man" + "github.com/hoijui/circuit/gocircuit.org/tutorial/mysql-nodejs" ) func main() { diff --git a/gocircuit.org/man/cmd.go b/gocircuit.org/man/cmd.go index 22e496a..0e6a5e6 100644 --- a/gocircuit.org/man/cmd.go +++ b/gocircuit.org/man/cmd.go @@ -1,7 +1,7 @@ package man import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderCommandPage() string { @@ -18,7 +18,7 @@ const commandBody = `

Once the circuit servers are started, you can create, observe and control circuit elements (i) interactively—using the circuit binary which doubles as a command-line client—as -well as (ii) programmatically—using the circuit Go client package github.com/gocircuit/circuit/client. +well as (ii) programmatically—using the circuit Go client package github.com/hoijui/circuit/client. In fact, the circuit command-line tool is simply a front-end for the Go client library.

Clients (the tool or your own) dial into a circuit server in order to diff --git a/gocircuit.org/man/element-channel.go b/gocircuit.org/man/element-channel.go index 3180e14..70658b4 100644 --- a/gocircuit.org/man/element-channel.go +++ b/gocircuit.org/man/element-channel.go @@ -1,7 +1,7 @@ package man import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderElementChannelPage() string { diff --git a/gocircuit.org/man/element-container.go b/gocircuit.org/man/element-container.go index 3e486a0..dadc69b 100644 --- a/gocircuit.org/man/element-container.go +++ b/gocircuit.org/man/element-container.go @@ -1,7 +1,7 @@ package man import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderElementContainerPage() string { diff --git a/gocircuit.org/man/element-dns.go b/gocircuit.org/man/element-dns.go index 04d0ddb..160a138 100644 --- a/gocircuit.org/man/element-dns.go +++ b/gocircuit.org/man/element-dns.go @@ -1,7 +1,7 @@ package man import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderElementDnsPage() string { diff --git a/gocircuit.org/man/element-process.go b/gocircuit.org/man/element-process.go index 659555f..fe8aab3 100644 --- a/gocircuit.org/man/element-process.go +++ b/gocircuit.org/man/element-process.go @@ -1,7 +1,7 @@ package man import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderElementProcessPage() string { @@ -16,7 +16,7 @@ func RenderElementProcessPage() string { //

To create and manipulate process elements, one needs to import the circuit's Go client API: //

-// 	import "github.com/gocircuit/circuit/client"
+// 	import "github.com/hoijui/circuit/client"
 // 
//

Let client, of type *client.Client, be an already established diff --git a/gocircuit.org/man/element-server.go b/gocircuit.org/man/element-server.go index cce00c1..4051dd2 100644 --- a/gocircuit.org/man/element-server.go +++ b/gocircuit.org/man/element-server.go @@ -1,7 +1,7 @@ package man import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderElementServerPage() string { diff --git a/gocircuit.org/man/element-subscription.go b/gocircuit.org/man/element-subscription.go index 7b8640f..bd36d19 100644 --- a/gocircuit.org/man/element-subscription.go +++ b/gocircuit.org/man/element-subscription.go @@ -1,7 +1,7 @@ package man import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderElementSubscriptionPage() string { diff --git a/gocircuit.org/man/history.go b/gocircuit.org/man/history.go index f264974..43b662c 100644 --- a/gocircuit.org/man/history.go +++ b/gocircuit.org/man/history.go @@ -1,7 +1,7 @@ package man import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderHistoryPage() string { diff --git a/gocircuit.org/man/install.go b/gocircuit.org/man/install.go index 6959e4d..eb80b03 100644 --- a/gocircuit.org/man/install.go +++ b/gocircuit.org/man/install.go @@ -1,7 +1,7 @@ package man import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderInstallPage() string { @@ -17,7 +17,7 @@ const installBody = ` you can build and install the circuit binary with one line:

-	go get github.com/gocircuit/circuit/cmd/circuit
+	go get github.com/hoijui/circuit/cmd/circuit
 
` diff --git a/gocircuit.org/man/metaphor.go b/gocircuit.org/man/metaphor.go index 3c64a7f..e1a092b 100644 --- a/gocircuit.org/man/metaphor.go +++ b/gocircuit.org/man/metaphor.go @@ -1,7 +1,7 @@ package man import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderMetaphorPage() string { diff --git a/gocircuit.org/man/run.go b/gocircuit.org/man/run.go index 10d25e1..d658255 100644 --- a/gocircuit.org/man/run.go +++ b/gocircuit.org/man/run.go @@ -1,7 +1,7 @@ package man import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderRunPage() string { diff --git a/gocircuit.org/man/security.go b/gocircuit.org/man/security.go index ef6910c..b3619b1 100644 --- a/gocircuit.org/man/security.go +++ b/gocircuit.org/man/security.go @@ -1,7 +1,7 @@ package man import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderSecurityPage() string { diff --git a/gocircuit.org/tutorial/mysql-nodejs/app.go b/gocircuit.org/tutorial/mysql-nodejs/app.go index d56d987..5d4f4bb 100644 --- a/gocircuit.org/tutorial/mysql-nodejs/app.go +++ b/gocircuit.org/tutorial/mysql-nodejs/app.go @@ -1,7 +1,7 @@ package mysql_nodejs import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderApp() string { @@ -18,7 +18,7 @@ the cluster.

The source of the finished app is located in:

-	$GOPATH/github.com/gocircuit/circuit/tutorial/nodejs-using-mysql/start-app/main.go
+	$GOPATH/github.com/hoijui/circuit/tutorial/nodejs-using-mysql/start-app/main.go
 

First strokes

@@ -32,7 +32,7 @@ package main import ( "flag" - "github.com/gocircuit/circuit/client" + "github.com/hoijui/circuit/client" ) var flagAddr = flag.String("addr", "", "circuit server address (looks like circuit://...)") @@ -48,7 +48,7 @@ func main() { } -

Notable here is the import of the circuit client package "github.com/gocircuit/circuit/client" +

Notable here is the import of the circuit client package "github.com/hoijui/circuit/client" and the definition of function fatalf(), which we'll use to report terminal errors. diff --git a/gocircuit.org/tutorial/mysql-nodejs/boot.go b/gocircuit.org/tutorial/mysql-nodejs/boot.go index bb96c4a..b268f53 100644 --- a/gocircuit.org/tutorial/mysql-nodejs/boot.go +++ b/gocircuit.org/tutorial/mysql-nodejs/boot.go @@ -1,7 +1,7 @@ package mysql_nodejs import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderBoot() string { @@ -64,7 +64,7 @@ Respectively, we redirect it to a host-local log file named /var/circuit/l locate in the source repo at

-	$GOPATH/src/github.com/gocircuit/circuit/tutorial/ec2/start-first-server.sh
+	$GOPATH/src/github.com/hoijui/circuit/tutorial/ec2/start-first-server.sh
 

Note that we are starting the circuit server as a singleton server, without diff --git a/gocircuit.org/tutorial/mysql-nodejs/image.go b/gocircuit.org/tutorial/mysql-nodejs/image.go index 744579d..39fe79e 100644 --- a/gocircuit.org/tutorial/mysql-nodejs/image.go +++ b/gocircuit.org/tutorial/mysql-nodejs/image.go @@ -1,7 +1,7 @@ package mysql_nodejs import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderImage() string { @@ -50,7 +50,7 @@ that points the Go compiler to a source tree.

Fetch and build the circuit, then place the circuit executable in the system path:

-	# go get github.com/gocircuit/circuit/cmd/circuit
+	# go get github.com/hoijui/circuit/cmd/circuit
 	# cp $GOPATH/bin/circuit /usr/local/bin
 
@@ -101,7 +101,7 @@ and place it nearby for convenience:
 	# cd $HOME
-	# cp -R $GOPATH/src/github.com/gocircuit/circuit/tutorial/nodejs-using-mysql/nodejs-app .
+	# cp -R $GOPATH/src/github.com/hoijui/circuit/tutorial/nodejs-using-mysql/nodejs-app .
 

And prepare the Node.js app for execution by fetching its Node.js package dependencies: diff --git a/gocircuit.org/tutorial/mysql-nodejs/overview.go b/gocircuit.org/tutorial/mysql-nodejs/overview.go index ccb280b..a0557cf 100644 --- a/gocircuit.org/tutorial/mysql-nodejs/overview.go +++ b/gocircuit.org/tutorial/mysql-nodejs/overview.go @@ -1,7 +1,7 @@ package mysql_nodejs import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderOverview() string { diff --git a/gocircuit.org/tutorial/mysql-nodejs/run.go b/gocircuit.org/tutorial/mysql-nodejs/run.go index 17fe911..99d3310 100644 --- a/gocircuit.org/tutorial/mysql-nodejs/run.go +++ b/gocircuit.org/tutorial/mysql-nodejs/run.go @@ -1,7 +1,7 @@ package mysql_nodejs import ( - . "github.com/gocircuit/circuit/gocircuit.org/render" + . "github.com/hoijui/circuit/gocircuit.org/render" ) func RenderRun() string { @@ -16,7 +16,7 @@ Log into any one of the EC2 instances that are part of your circuit cluster.

First, build and install the circuit app, which can be found within the circuit repo:

-	$ go install github.com/gocircuit/circuit/tutorial/nodejs-using-mysql/start-app
+	$ go install github.com/hoijui/circuit/tutorial/nodejs-using-mysql/start-app
 

This will place the resulting executable in $GOPATH/bin. diff --git a/kit/assemble/assemble.go b/kit/assemble/assemble.go index 32d33fd..a6767ec 100644 --- a/kit/assemble/assemble.go +++ b/kit/assemble/assemble.go @@ -11,9 +11,9 @@ import ( "log" "net" - "github.com/gocircuit/circuit/kit/xor" - "github.com/gocircuit/circuit/use/circuit" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/kit/xor" + "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/use/n" ) type Assembler struct { diff --git a/kit/assemble/dialback.go b/kit/assemble/dialback.go index 86e1cda..c7dbc61 100644 --- a/kit/assemble/dialback.go +++ b/kit/assemble/dialback.go @@ -10,8 +10,8 @@ package assemble import ( "sync" - "github.com/gocircuit/circuit/use/circuit" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/use/n" ) type DialBack struct { diff --git a/kit/assemble/discover_test.go b/kit/assemble/discover_test.go index 3a8ff7a..c7f71b8 100644 --- a/kit/assemble/discover_test.go +++ b/kit/assemble/discover_test.go @@ -12,7 +12,7 @@ import ( "net" "testing" - "github.com/gocircuit/circuit/kit/xor" + "github.com/hoijui/circuit/kit/xor" ) // func TestAssembler(t *testing.T) { diff --git a/kit/assemble/gather.go b/kit/assemble/gather.go index b905b4f..895f1c5 100644 --- a/kit/assemble/gather.go +++ b/kit/assemble/gather.go @@ -14,7 +14,7 @@ import ( "os" "runtime" - "github.com/gocircuit/circuit/kit/xor" + "github.com/hoijui/circuit/kit/xor" ) type Gather struct { diff --git a/kit/assemble/lens.go b/kit/assemble/lens.go index 78b1868..5bdc1c1 100644 --- a/kit/assemble/lens.go +++ b/kit/assemble/lens.go @@ -12,7 +12,7 @@ import ( "fmt" "sync" - "github.com/gocircuit/circuit/kit/xor" + "github.com/hoijui/circuit/kit/xor" ) type Lens struct { diff --git a/kit/assemble/scatter.go b/kit/assemble/scatter.go index 8a83d39..6d68820 100644 --- a/kit/assemble/scatter.go +++ b/kit/assemble/scatter.go @@ -13,7 +13,7 @@ import ( "net" "time" - "github.com/gocircuit/circuit/kit/xor" + "github.com/hoijui/circuit/kit/xor" ) type Scatter struct { diff --git a/kit/debug/ctrlc/init.go b/kit/debug/ctrlc/init.go index 43e0bd4..5762a01 100644 --- a/kit/debug/ctrlc/init.go +++ b/kit/debug/ctrlc/init.go @@ -8,7 +8,7 @@ // Package ctrlc has the side effect of installing a Ctrl-C signal handler that throws a panic package ctrlc -import "github.com/gocircuit/circuit/kit/debug" +import "github.com/hoijui/circuit/kit/debug" func init() { debug.InstallCtrlCPanic() diff --git a/kit/debug/kill/init.go b/kit/debug/kill/init.go index 700d7c8..5319332 100644 --- a/kit/debug/kill/init.go +++ b/kit/debug/kill/init.go @@ -8,7 +8,7 @@ // Package kill has the side effect of installing a KILL signal handler that throws a panic package kill -import "github.com/gocircuit/circuit/kit/debug" +import "github.com/hoijui/circuit/kit/debug" func init() { debug.InstallKillPanic() diff --git a/kit/iomisc/sniffer.go b/kit/iomisc/sniffer.go index 7315755..4b283b4 100644 --- a/kit/iomisc/sniffer.go +++ b/kit/iomisc/sniffer.go @@ -15,7 +15,7 @@ import ( "runtime" "sync" - "github.com/gocircuit/circuit/use/errors" + "github.com/hoijui/circuit/use/errors" ) // ?? diff --git a/kit/posix/shell.go b/kit/posix/shell.go index 43e8590..351b104 100644 --- a/kit/posix/shell.go +++ b/kit/posix/shell.go @@ -9,7 +9,7 @@ package posix import ( "bytes" - "github.com/gocircuit/circuit/kit/iomisc" + "github.com/hoijui/circuit/kit/iomisc" "io" "os" "os/exec" diff --git a/kit/pubsub/pubsub.go b/kit/pubsub/pubsub.go index 13b6945..631a645 100644 --- a/kit/pubsub/pubsub.go +++ b/kit/pubsub/pubsub.go @@ -12,7 +12,7 @@ import ( "runtime" "sync" - "github.com/gocircuit/circuit/use/circuit" + "github.com/hoijui/circuit/use/circuit" ) // PubSub… diff --git a/kit/shell/shell.go b/kit/shell/shell.go index 06694c5..4d02822 100644 --- a/kit/shell/shell.go +++ b/kit/shell/shell.go @@ -10,10 +10,10 @@ package shell import ( "io" - xyexec "github.com/gocircuit/circuit/kit/x/exec" - xyio "github.com/gocircuit/circuit/kit/x/io" - "github.com/gocircuit/circuit/use/circuit" - "github.com/gocircuit/circuit/use/errors" + xyexec "github.com/hoijui/circuit/kit/x/exec" + xyio "github.com/hoijui/circuit/kit/x/io" + "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/use/errors" ) // XXX: Run commands in their own process groups? diff --git a/kit/tele/blend/_blend_test.go b/kit/tele/blend/_blend_test.go index c080f84..9c7c5d8 100644 --- a/kit/tele/blend/_blend_test.go +++ b/kit/tele/blend/_blend_test.go @@ -13,12 +13,12 @@ import ( "testing" "time" - _ "github.com/gocircuit/circuit/kit/debug/ctrlc" - "github.com/gocircuit/circuit/kit/tele/chain" - "github.com/gocircuit/circuit/kit/tele/codec" - "github.com/gocircuit/circuit/kit/tele/faithful" - "github.com/gocircuit/circuit/kit/tele/sandbox" - "github.com/gocircuit/circuit/kit/tele/trace" + _ "github.com/hoijui/circuit/kit/debug/ctrlc" + "github.com/hoijui/circuit/kit/tele/chain" + "github.com/hoijui/circuit/kit/tele/codec" + "github.com/hoijui/circuit/kit/tele/faithful" + "github.com/hoijui/circuit/kit/tele/sandbox" + "github.com/hoijui/circuit/kit/tele/trace" ) type testMsg struct { diff --git a/kit/tele/blend/_close_test.go b/kit/tele/blend/_close_test.go index e4b1c00..26398da 100644 --- a/kit/tele/blend/_close_test.go +++ b/kit/tele/blend/_close_test.go @@ -12,12 +12,12 @@ import ( "testing" "time" - _ "github.com/gocircuit/circuit/kit/debug/ctrlc" - "github.com/gocircuit/circuit/kit/tele/chain" - "github.com/gocircuit/circuit/kit/tele/codec" - "github.com/gocircuit/circuit/kit/tele/faithful" - "github.com/gocircuit/circuit/kit/tele/tcp" - "github.com/gocircuit/circuit/kit/tele/trace" + _ "github.com/hoijui/circuit/kit/debug/ctrlc" + "github.com/hoijui/circuit/kit/tele/chain" + "github.com/hoijui/circuit/kit/tele/codec" + "github.com/hoijui/circuit/kit/tele/faithful" + "github.com/hoijui/circuit/kit/tele/tcp" + "github.com/hoijui/circuit/kit/tele/trace" ) func TestClosure(t *testing.T) { diff --git a/kit/tele/blend/dialer.go b/kit/tele/blend/dialer.go index 4ad5ecd..0067e52 100644 --- a/kit/tele/blend/dialer.go +++ b/kit/tele/blend/dialer.go @@ -10,8 +10,8 @@ package blend import ( "net" - "github.com/gocircuit/circuit/kit/tele/codec" - "github.com/gocircuit/circuit/kit/tele/trace" + "github.com/hoijui/circuit/kit/tele/codec" + "github.com/hoijui/circuit/kit/tele/trace" ) type Dialer struct { diff --git a/kit/tele/blend/listener.go b/kit/tele/blend/listener.go index f81a85b..1c2a2d8 100644 --- a/kit/tele/blend/listener.go +++ b/kit/tele/blend/listener.go @@ -10,8 +10,8 @@ package blend import ( "net" - "github.com/gocircuit/circuit/kit/tele/codec" - "github.com/gocircuit/circuit/kit/tele/trace" + "github.com/hoijui/circuit/kit/tele/codec" + "github.com/hoijui/circuit/kit/tele/trace" ) type Listener struct { diff --git a/kit/tele/blend/session.go b/kit/tele/blend/session.go index 9b53946..300ac5e 100644 --- a/kit/tele/blend/session.go +++ b/kit/tele/blend/session.go @@ -13,8 +13,8 @@ import ( "sync" "time" - "github.com/gocircuit/circuit/kit/tele/codec" - "github.com/gocircuit/circuit/kit/tele/trace" + "github.com/hoijui/circuit/kit/tele/codec" + "github.com/hoijui/circuit/kit/tele/trace" ) // AcceptSession diff --git a/kit/tele/blend/transport.go b/kit/tele/blend/transport.go index 5c65529..b0d1e07 100644 --- a/kit/tele/blend/transport.go +++ b/kit/tele/blend/transport.go @@ -10,8 +10,8 @@ package blend import ( "net" - "github.com/gocircuit/circuit/kit/tele/codec" - "github.com/gocircuit/circuit/kit/tele/trace" + "github.com/hoijui/circuit/kit/tele/codec" + "github.com/hoijui/circuit/kit/tele/trace" ) type Transport struct { diff --git a/kit/tele/codec/_codec_test.go b/kit/tele/codec/_codec_test.go index c241898..bcd11e3 100644 --- a/kit/tele/codec/_codec_test.go +++ b/kit/tele/codec/_codec_test.go @@ -12,11 +12,11 @@ import ( "testing" "time" - _ "github.com/gocircuit/circuit/kit/debug/ctrlc" - "github.com/gocircuit/circuit/kit/tele/chain" - "github.com/gocircuit/circuit/kit/tele/faithful" - "github.com/gocircuit/circuit/kit/tele/sandbox" - "github.com/gocircuit/circuit/kit/tele/trace" + _ "github.com/hoijui/circuit/kit/debug/ctrlc" + "github.com/hoijui/circuit/kit/tele/chain" + "github.com/hoijui/circuit/kit/tele/faithful" + "github.com/hoijui/circuit/kit/tele/sandbox" + "github.com/hoijui/circuit/kit/tele/trace" ) type testMsg struct { diff --git a/kit/tele/hmac/codec.go b/kit/tele/hmac/codec.go index 65c61fe..6f6e460 100644 --- a/kit/tele/hmac/codec.go +++ b/kit/tele/hmac/codec.go @@ -25,8 +25,8 @@ import ( //"runtime/debug" "strings" - "github.com/gocircuit/circuit/kit/tele/codec" - "github.com/gocircuit/circuit/kit/tele/trace" + "github.com/hoijui/circuit/kit/tele/codec" + "github.com/hoijui/circuit/kit/tele/trace" ) func NewTransport(key []byte) codec.CarrierTransport { diff --git a/kit/tele/tcp/codec.go b/kit/tele/tcp/codec.go index 2256201..424a1e1 100644 --- a/kit/tele/tcp/codec.go +++ b/kit/tele/tcp/codec.go @@ -15,8 +15,8 @@ import ( "net" "strings" - "github.com/gocircuit/circuit/kit/tele/codec" - "github.com/gocircuit/circuit/kit/tele/trace" + "github.com/hoijui/circuit/kit/tele/codec" + "github.com/hoijui/circuit/kit/tele/trace" ) // CodecTransport is a codec.Carrier over TCP. diff --git a/kit/tele/tele.go b/kit/tele/tele.go index f48b05a..fde0a59 100644 --- a/kit/tele/tele.go +++ b/kit/tele/tele.go @@ -8,11 +8,11 @@ package tele import ( - "github.com/gocircuit/circuit/kit/tele/blend" - "github.com/gocircuit/circuit/kit/tele/codec" - "github.com/gocircuit/circuit/kit/tele/hmac" - "github.com/gocircuit/circuit/kit/tele/tcp" - "github.com/gocircuit/circuit/kit/tele/trace" + "github.com/hoijui/circuit/kit/tele/blend" + "github.com/hoijui/circuit/kit/tele/codec" + "github.com/hoijui/circuit/kit/tele/hmac" + "github.com/hoijui/circuit/kit/tele/tcp" + "github.com/hoijui/circuit/kit/tele/trace" ) func NewStructOverTCP() *blend.Transport { diff --git a/kit/x/exec/exec.go b/kit/x/exec/exec.go index 15fa385..fc13d7f 100644 --- a/kit/x/exec/exec.go +++ b/kit/x/exec/exec.go @@ -14,10 +14,10 @@ import ( "sync" "syscall" - "github.com/gocircuit/circuit/kit/pty" - xyio "github.com/gocircuit/circuit/kit/x/io" - "github.com/gocircuit/circuit/use/circuit" - "github.com/gocircuit/circuit/use/errors" + "github.com/hoijui/circuit/kit/pty" + xyio "github.com/hoijui/circuit/kit/x/io" + "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/use/errors" ) // XCmd exports chroot-ed shells. diff --git a/kit/x/file/file.go b/kit/x/file/file.go index f2a9fd2..6afee38 100644 --- a/kit/x/file/file.go +++ b/kit/x/file/file.go @@ -15,8 +15,8 @@ import ( "os" "runtime" - "github.com/gocircuit/circuit/use/circuit" - "github.com/gocircuit/circuit/use/errors" + "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/use/errors" ) func init() { diff --git a/kit/x/io/io.go b/kit/x/io/io.go index 34491b1..d0df42b 100644 --- a/kit/x/io/io.go +++ b/kit/x/io/io.go @@ -13,8 +13,8 @@ import ( "runtime" "time" - "github.com/gocircuit/circuit/use/circuit" - "github.com/gocircuit/circuit/use/errors" + "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/use/errors" ) func init() { diff --git a/misc/docker/build.sh b/misc/docker/build.sh index 00fd4d1..c6108ac 100755 --- a/misc/docker/build.sh +++ b/misc/docker/build.sh @@ -14,4 +14,4 @@ export PATH=$PATH:/go/golang/bin:/go/workspace/bin:/go/util mkdir -p /go/workspace/src -go get github.com/gocircuit/circuit/cmd/circuit +go get github.com/hoijui/circuit/cmd/circuit diff --git a/misc/vagrant/.bash_profile b/misc/vagrant/.bash_profile index 9d59dda..0a1f147 100644 --- a/misc/vagrant/.bash_profile +++ b/misc/vagrant/.bash_profile @@ -38,7 +38,7 @@ alias c='cat' alias gs="" # disable gs command alias c0m="cd ~/0/src/github.com/petar/maymounkov.io" -alias c0c="cd ~/0/src/github.com/gocircuit/circuit" +alias c0c="cd ~/0/src/github.com/hoijui/circuit" # HG aliases alias hll='hg log | less' @@ -90,10 +90,10 @@ export GOROOT=$HOME/go export PATH=$PATH:$HOME/0/bin:$GOROOT/bin # CIRCUIT -declare -x CIRCUIT=/Users/petar/0/src/github.com/gocircuit/circuit/cmd/circuit/.circuit -declare -x CIRCUIT_HMAC=/Users/petar/0/src/github.com/gocircuit/circuit/cmd/circuit/.hmac +declare -x CIRCUIT=/Users/petar/0/src/github.com/hoijui/circuit/cmd/circuit/.circuit +declare -x CIRCUIT_HMAC=/Users/petar/0/src/github.com/hoijui/circuit/cmd/circuit/.hmac -export VAGRANT_CWD=$GOPATH/src/github.com/gocircuit/circuit/misc/vagrant +export VAGRANT_CWD=$GOPATH/src/github.com/hoijui/circuit/misc/vagrant # export VAGRANT_GO_ORIGIN=$HOME/vagrant/go # export VAGRANT_GOCIRCUIT_ORIGIN=$HOME/vagrant/gocircuit diff --git a/sys/acid/acid.go b/sys/acid/acid.go index 7c4c634..d388ad8 100644 --- a/sys/acid/acid.go +++ b/sys/acid/acid.go @@ -15,8 +15,8 @@ import ( "runtime/pprof" "time" - "github.com/gocircuit/circuit/use/circuit" - "github.com/gocircuit/circuit/use/errors" + "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/use/errors" ) func New() *Acid { diff --git a/sys/acid/behalf.go b/sys/acid/behalf.go index 2627ede..63ca642 100644 --- a/sys/acid/behalf.go +++ b/sys/acid/behalf.go @@ -8,7 +8,7 @@ package acid import ( - "github.com/gocircuit/circuit/use/circuit" + "github.com/hoijui/circuit/use/circuit" "fmt" "reflect" ) diff --git a/sys/lang/_runtime_test.go b/sys/lang/_runtime_test.go index 31cce60..e0737f6 100644 --- a/sys/lang/_runtime_test.go +++ b/sys/lang/_runtime_test.go @@ -8,8 +8,8 @@ package lang import ( - "github.com/gocircuit/circuit/sys/lang/types" - "github.com/gocircuit/circuit/use/circuit" + "github.com/hoijui/circuit/sys/lang/types" + "github.com/hoijui/circuit/use/circuit" "fmt" "runtime" "strconv" diff --git a/sys/lang/call.go b/sys/lang/call.go index 34edba4..dd020ef 100644 --- a/sys/lang/call.go +++ b/sys/lang/call.go @@ -8,7 +8,7 @@ package lang import ( - "github.com/gocircuit/circuit/sys/lang/types" + "github.com/hoijui/circuit/sys/lang/types" "fmt" "reflect" "runtime/debug" diff --git a/sys/lang/dial.go b/sys/lang/dial.go index 452b346..06c8b79 100644 --- a/sys/lang/dial.go +++ b/sys/lang/dial.go @@ -11,9 +11,9 @@ import ( //"fmt" //"runtime/debug" - "github.com/gocircuit/circuit/sys/lang/types" - "github.com/gocircuit/circuit/use/circuit" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/sys/lang/types" + "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/use/n" ) func (r *Runtime) Listen(service string, receiver interface{}) { diff --git a/sys/lang/doc.go b/sys/lang/doc.go index 661f85c..17458ab 100644 --- a/sys/lang/doc.go +++ b/sys/lang/doc.go @@ -11,7 +11,7 @@ package lang FORKING A GO ROUTINE ON A REMOTE RUNTIME - import . "github.com/gocircuit/circuit/use/circuit" + import . "github.com/hoijui/circuit/use/circuit" type MyFunc struct{} func (MyFunc) AnyName(anyArg anyType) (anyReturn anyType) { diff --git a/sys/lang/exp.go b/sys/lang/exp.go index 7e882c8..b9a3a97 100644 --- a/sys/lang/exp.go +++ b/sys/lang/exp.go @@ -13,9 +13,9 @@ import ( "runtime" "sync" - "github.com/gocircuit/circuit/sys/lang/types" - "github.com/gocircuit/circuit/use/circuit" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/sys/lang/types" + "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/use/n" ) // expTabl issues (and reclaims) universal handles to local values diff --git a/sys/lang/freeze_test.go b/sys/lang/freeze_test.go index 829551f..656227d 100644 --- a/sys/lang/freeze_test.go +++ b/sys/lang/freeze_test.go @@ -10,7 +10,7 @@ package lang import ( "fmt" "testing" - "github.com/gocircuit/circuit/use/circuit" + "github.com/hoijui/circuit/use/circuit" ) func TestExportImport(t *testing.T) { diff --git a/sys/lang/func.go b/sys/lang/func.go index 21b5693..55050c3 100644 --- a/sys/lang/func.go +++ b/sys/lang/func.go @@ -15,11 +15,11 @@ import ( "runtime/pprof" "time" - "github.com/gocircuit/circuit/sys/lang/types" - "github.com/gocircuit/circuit/use/circuit" - "github.com/gocircuit/circuit/use/errors" - "github.com/gocircuit/circuit/use/n" - "github.com/gocircuit/circuit/use/worker" + "github.com/hoijui/circuit/sys/lang/types" + "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/use/errors" + "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/use/worker" ) func (r *Runtime) Kill(addr n.Addr) error { diff --git a/sys/lang/imp.go b/sys/lang/imp.go index 27d3db1..65b67f5 100644 --- a/sys/lang/imp.go +++ b/sys/lang/imp.go @@ -13,9 +13,9 @@ import ( "runtime" "sync" - "github.com/gocircuit/circuit/sys/lang/types" - "github.com/gocircuit/circuit/use/circuit" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/sys/lang/types" + "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/use/n" ) // impTabl keeps track of values that have been imported diff --git a/sys/lang/lang.go b/sys/lang/lang.go index 8163e6c..7c6052a 100644 --- a/sys/lang/lang.go +++ b/sys/lang/lang.go @@ -9,9 +9,9 @@ package lang import ( - "github.com/gocircuit/circuit/kit/lang" - "github.com/gocircuit/circuit/use/circuit" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/kit/lang" + "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/use/n" ) // _ref wraps a user object, indicating to the runtime that the user has diff --git a/sys/lang/msg.go b/sys/lang/msg.go index a45c60f..6d89089 100644 --- a/sys/lang/msg.go +++ b/sys/lang/msg.go @@ -11,9 +11,9 @@ import ( "encoding/gob" "fmt" - "github.com/gocircuit/circuit/sys/lang/types" - "github.com/gocircuit/circuit/use/circuit" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/sys/lang/types" + "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/use/n" ) func init() { diff --git a/sys/lang/prof/profile.go b/sys/lang/prof/profile.go index 5d0bcdb..d8694b4 100644 --- a/sys/lang/prof/profile.go +++ b/sys/lang/prof/profile.go @@ -9,7 +9,7 @@ package prof import ( - "github.com/gocircuit/circuit/kit/stat" + "github.com/hoijui/circuit/kit/stat" "sync" "time" ) diff --git a/sys/lang/ptrptr.go b/sys/lang/ptrptr.go index fb7475c..c15abd7 100644 --- a/sys/lang/ptrptr.go +++ b/sys/lang/ptrptr.go @@ -10,8 +10,8 @@ package lang import ( "strings" - "github.com/gocircuit/circuit/use/circuit" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/use/n" ) func (r *Runtime) callGetPtr(srcID circuit.HandleID, exporter n.Addr) (circuit.X, error) { diff --git a/sys/lang/readwriter.go b/sys/lang/readwriter.go index 236d02e..cd8b0a8 100644 --- a/sys/lang/readwriter.go +++ b/sys/lang/readwriter.go @@ -14,7 +14,7 @@ import ( "net" "sync" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/use/n" ) func NewBytesConn(addr string) n.Conn { diff --git a/sys/lang/runtime.go b/sys/lang/runtime.go index 11a357f..d3dc0dd 100644 --- a/sys/lang/runtime.go +++ b/sys/lang/runtime.go @@ -11,11 +11,11 @@ import ( "log" "sync" - "github.com/gocircuit/circuit/sys/acid" - "github.com/gocircuit/circuit/sys/lang/prof" - "github.com/gocircuit/circuit/sys/lang/types" - "github.com/gocircuit/circuit/use/circuit" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/sys/acid" + "github.com/hoijui/circuit/sys/lang/prof" + "github.com/hoijui/circuit/sys/lang/types" + "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/use/n" ) // Runtime represents that state of the circuit program at the present moment. diff --git a/sys/lang/sandbox.go b/sys/lang/sandbox.go index 67d0ade..c135250 100644 --- a/sys/lang/sandbox.go +++ b/sys/lang/sandbox.go @@ -13,7 +13,7 @@ import ( "net" "sync" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/use/n" ) type sandbox struct { diff --git a/sys/lang/value.go b/sys/lang/value.go index 8685894..7081e4f 100644 --- a/sys/lang/value.go +++ b/sys/lang/value.go @@ -11,7 +11,7 @@ import ( "log" "strings" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/use/n" ) func (r *Runtime) serveDropPtr(q *dropPtrMsg, conn n.Conn) { diff --git a/sys/lang/vexp.go b/sys/lang/vexp.go index ce9a535..9bb853d 100644 --- a/sys/lang/vexp.go +++ b/sys/lang/vexp.go @@ -13,7 +13,7 @@ import ( "reflect" "sync" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/use/n" ) type exportGroup struct { diff --git a/sys/lang/vimp.go b/sys/lang/vimp.go index 92ce658..2f91bb5 100644 --- a/sys/lang/vimp.go +++ b/sys/lang/vimp.go @@ -11,7 +11,7 @@ import ( "reflect" "sync" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/use/n" ) type importGroup struct { diff --git a/sys/tele/_tele_test.go b/sys/tele/_tele_test.go index 426256f..192374f 100644 --- a/sys/tele/_tele_test.go +++ b/sys/tele/_tele_test.go @@ -14,7 +14,7 @@ import ( "os" "testing" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/use/n" ) type testMsg struct{} diff --git a/sys/tele/addr.go b/sys/tele/addr.go index d34dad1..e5703d4 100644 --- a/sys/tele/addr.go +++ b/sys/tele/addr.go @@ -15,8 +15,8 @@ import ( "strconv" "strings" - "github.com/gocircuit/circuit/use/errors" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/use/errors" + "github.com/hoijui/circuit/use/n" ) // Addr maintains a single unique instance for each addr. diff --git a/sys/tele/conn.go b/sys/tele/conn.go index 1284148..e4783a3 100644 --- a/sys/tele/conn.go +++ b/sys/tele/conn.go @@ -8,8 +8,8 @@ package tele import ( - "github.com/gocircuit/circuit/kit/tele/blend" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/kit/tele/blend" + "github.com/hoijui/circuit/use/n" ) type Conn struct { diff --git a/sys/tele/dialer.go b/sys/tele/dialer.go index 70b6064..d2dbb47 100644 --- a/sys/tele/dialer.go +++ b/sys/tele/dialer.go @@ -12,9 +12,9 @@ import ( "sync" "time" - "github.com/gocircuit/circuit/kit/tele/blend" - "github.com/gocircuit/circuit/use/errors" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/kit/tele/blend" + "github.com/hoijui/circuit/use/errors" + "github.com/hoijui/circuit/use/n" ) // Dialer diff --git a/sys/tele/listener.go b/sys/tele/listener.go index 73112da..3d0b4f7 100644 --- a/sys/tele/listener.go +++ b/sys/tele/listener.go @@ -14,9 +14,9 @@ import ( "os" "sync" - "github.com/gocircuit/circuit/kit/tele/blend" - "github.com/gocircuit/circuit/use/errors" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/kit/tele/blend" + "github.com/hoijui/circuit/use/errors" + "github.com/hoijui/circuit/use/n" ) // Listener diff --git a/sys/tele/transport.go b/sys/tele/transport.go index c30d1df..54c6e27 100644 --- a/sys/tele/transport.go +++ b/sys/tele/transport.go @@ -12,9 +12,9 @@ import ( "net" "os" - "github.com/gocircuit/circuit/kit/tele" - "github.com/gocircuit/circuit/kit/tele/blend" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/kit/tele" + "github.com/hoijui/circuit/kit/tele/blend" + "github.com/hoijui/circuit/use/n" ) func init() { diff --git a/tissue/folk.go b/tissue/folk.go index 96e3933..6fdea2b 100644 --- a/tissue/folk.go +++ b/tissue/folk.go @@ -10,7 +10,7 @@ package tissue import ( //"sync" - "github.com/gocircuit/circuit/kit/lang" + "github.com/hoijui/circuit/kit/lang" ) type Folk struct { diff --git a/tissue/kin.go b/tissue/kin.go index 6f799ba..0e674c1 100644 --- a/tissue/kin.go +++ b/tissue/kin.go @@ -13,9 +13,9 @@ import ( "sync" //"runtime/debug" - "github.com/gocircuit/circuit/kit/lang" - "github.com/gocircuit/circuit/use/circuit" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/kit/lang" + "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/use/n" ) // Kin is a service that maintains connectivity to a small set of 'neighbor' circuits. diff --git a/tissue/locus/locus.go b/tissue/locus/locus.go index a77269d..eff9003 100644 --- a/tissue/locus/locus.go +++ b/tissue/locus/locus.go @@ -12,12 +12,12 @@ import ( "path" "time" - "github.com/gocircuit/circuit/anchor" - srv "github.com/gocircuit/circuit/element/server" - "github.com/gocircuit/circuit/kit/pubsub" - "github.com/gocircuit/circuit/tissue" - "github.com/gocircuit/circuit/tissue/tube" - "github.com/gocircuit/circuit/use/circuit" + "github.com/hoijui/circuit/anchor" + srv "github.com/hoijui/circuit/element/server" + "github.com/hoijui/circuit/kit/pubsub" + "github.com/hoijui/circuit/tissue" + "github.com/hoijui/circuit/tissue/tube" + "github.com/hoijui/circuit/use/circuit" ) // Locus is a device that listens to the join/leave events reported by the tissue social diff --git a/tissue/locus/peer.go b/tissue/locus/peer.go index 2b8e2da..1155b7d 100644 --- a/tissue/locus/peer.go +++ b/tissue/locus/peer.go @@ -10,9 +10,9 @@ package locus import ( "encoding/gob" - "github.com/gocircuit/circuit/kit/lang" - "github.com/gocircuit/circuit/tissue" - "github.com/gocircuit/circuit/use/circuit" + "github.com/hoijui/circuit/kit/lang" + "github.com/hoijui/circuit/tissue" + "github.com/hoijui/circuit/use/circuit" ) // Peer encloses a cross-interface to the tissue system of a circuit worker, as well as diff --git a/tissue/locus/x.go b/tissue/locus/x.go index 963b895..0cbf509 100644 --- a/tissue/locus/x.go +++ b/tissue/locus/x.go @@ -8,7 +8,7 @@ package locus import ( - "github.com/gocircuit/circuit/use/circuit" + "github.com/hoijui/circuit/use/circuit" ) func init() { diff --git a/tissue/neighborhood.go b/tissue/neighborhood.go index 61db1a6..5a736d3 100644 --- a/tissue/neighborhood.go +++ b/tissue/neighborhood.go @@ -10,7 +10,7 @@ package tissue import ( "sync" - "github.com/gocircuit/circuit/kit/lang" + "github.com/hoijui/circuit/kit/lang" ) // Neighborhood is a set of perm cross-interfaces. diff --git a/tissue/tube/tube.go b/tissue/tube/tube.go index 2f2849c..62c5d11 100644 --- a/tissue/tube/tube.go +++ b/tissue/tube/tube.go @@ -12,10 +12,10 @@ import ( "sync" "time" - "github.com/gocircuit/circuit/tissue" - "github.com/gocircuit/circuit/kit/lang" - "github.com/gocircuit/circuit/kit/pubsub" - "github.com/gocircuit/circuit/use/circuit" + "github.com/hoijui/circuit/tissue" + "github.com/hoijui/circuit/kit/lang" + "github.com/hoijui/circuit/kit/pubsub" + "github.com/hoijui/circuit/use/circuit" ) // Tube is a folk data structure that maintains a key-value set sorted by key. diff --git a/tissue/tube/view.go b/tissue/tube/view.go index 522a057..6dd698f 100644 --- a/tissue/tube/view.go +++ b/tissue/tube/view.go @@ -13,7 +13,7 @@ import ( "sync" "time" - "github.com/gocircuit/circuit/kit/pubsub" + "github.com/hoijui/circuit/kit/pubsub" ) // View is a folk data structure that maintains a key-value set sorted by key diff --git a/tissue/tube/x.go b/tissue/tube/x.go index 39bd8e6..b79ebe4 100644 --- a/tissue/tube/x.go +++ b/tissue/tube/x.go @@ -10,8 +10,8 @@ package tube import ( "time" - "github.com/gocircuit/circuit/tissue" - "github.com/gocircuit/circuit/use/circuit" + "github.com/hoijui/circuit/tissue" + "github.com/hoijui/circuit/use/circuit" ) // XTube is the interface to a tube, given to the tube's upstream (cross-circiuit) peering tubes. diff --git a/tissue/util.go b/tissue/util.go index 4c26e49..14bf84b 100644 --- a/tissue/util.go +++ b/tissue/util.go @@ -10,8 +10,8 @@ package tissue import ( "fmt" - "github.com/gocircuit/circuit/kit/lang" - "github.com/gocircuit/circuit/use/circuit" + "github.com/hoijui/circuit/kit/lang" + "github.com/hoijui/circuit/use/circuit" ) func init() { diff --git a/tutorial/nodejs-using-mysql/start-app/main.go b/tutorial/nodejs-using-mysql/start-app/main.go index 9ceac7d..c35f4fb 100644 --- a/tutorial/nodejs-using-mysql/start-app/main.go +++ b/tutorial/nodejs-using-mysql/start-app/main.go @@ -19,7 +19,7 @@ import ( "strconv" "strings" - "github.com/gocircuit/circuit/client" + "github.com/hoijui/circuit/client" ) var flagAddr = flag.String("addr", "", "circuit server address, looks like circuit://...") diff --git a/tutorial/wait-all/main.go b/tutorial/wait-all/main.go index 130ad3e..668de98 100644 --- a/tutorial/wait-all/main.go +++ b/tutorial/wait-all/main.go @@ -12,7 +12,7 @@ import ( "os" "strconv" - "github.com/gocircuit/circuit/client" + "github.com/hoijui/circuit/client" ) const n = 5 diff --git a/tutorial/wait-first/main.go b/tutorial/wait-first/main.go index 7521be7..7413170 100644 --- a/tutorial/wait-first/main.go +++ b/tutorial/wait-first/main.go @@ -12,7 +12,7 @@ import ( "os" "strconv" - "github.com/gocircuit/circuit/client" + "github.com/hoijui/circuit/client" ) const n = 5 diff --git a/tutorial/watchbot-with-chan/main.go b/tutorial/watchbot-with-chan/main.go index bb36a2b..67e6446 100644 --- a/tutorial/watchbot-with-chan/main.go +++ b/tutorial/watchbot-with-chan/main.go @@ -34,7 +34,7 @@ import ( "strconv" "time" - "github.com/gocircuit/circuit/client" + "github.com/hoijui/circuit/client" ) // pickServer returns the root anchor of a randomly-chosen circuit server in the cluster. diff --git a/tutorial/watchbot/main.go b/tutorial/watchbot/main.go index e9cfd11..5bb725d 100644 --- a/tutorial/watchbot/main.go +++ b/tutorial/watchbot/main.go @@ -31,7 +31,7 @@ import ( "os" "time" - "github.com/gocircuit/circuit/client" + "github.com/hoijui/circuit/client" ) // pickServer returns the root anchor of a randomly-chosen circuit server in the cluster. diff --git a/use/anchorfs/anchorfs.go b/use/anchorfs/anchorfs.go index 6d8c678..cf44483 100644 --- a/use/anchorfs/anchorfs.go +++ b/use/anchorfs/anchorfs.go @@ -13,8 +13,8 @@ import ( "strings" "time" - "github.com/gocircuit/circuit/use/errors" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/use/errors" + "github.com/hoijui/circuit/use/n" ) var ( diff --git a/use/anchorfs/module.go b/use/anchorfs/module.go index aa312c3..e01f821 100644 --- a/use/anchorfs/module.go +++ b/use/anchorfs/module.go @@ -8,7 +8,7 @@ package anchorfs import ( - "github.com/gocircuit/circuit/kit/module" + "github.com/hoijui/circuit/kit/module" ) var mod = module.Slot{Name: "anchor file system"} diff --git a/use/circuit/lang.go b/use/circuit/lang.go index 267fb23..e6d7f81 100644 --- a/use/circuit/lang.go +++ b/use/circuit/lang.go @@ -11,7 +11,7 @@ import ( "fmt" "math/rand" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/use/n" ) // HandleID is a universal ID referring to a circuit value accessible across workers diff --git a/use/circuit/module.go b/use/circuit/module.go index 99aa5d3..51af0dd 100644 --- a/use/circuit/module.go +++ b/use/circuit/module.go @@ -9,10 +9,10 @@ package circuit import ( - "github.com/gocircuit/circuit/kit/module" - "github.com/gocircuit/circuit/sys/lang/types" - "github.com/gocircuit/circuit/use/n" - "github.com/gocircuit/circuit/use/worker" + "github.com/hoijui/circuit/kit/module" + "github.com/hoijui/circuit/sys/lang/types" + "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/use/worker" ) var mod = module.Slot{Name: "language"} diff --git a/use/circuit/runtime.go b/use/circuit/runtime.go index 866e55c..65d312e 100644 --- a/use/circuit/runtime.go +++ b/use/circuit/runtime.go @@ -8,8 +8,8 @@ package circuit import ( - "github.com/gocircuit/circuit/use/n" - "github.com/gocircuit/circuit/use/worker" + "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/use/worker" ) type runtime interface { diff --git a/use/n/id.go b/use/n/id.go index a501acf..60527ab 100644 --- a/use/n/id.go +++ b/use/n/id.go @@ -13,7 +13,7 @@ import ( "math/rand" "strconv" - "github.com/gocircuit/circuit/use/errors" + "github.com/hoijui/circuit/use/errors" ) var ErrParse = errors.NewError("parse") diff --git a/use/n/module.go b/use/n/module.go index 0dc70a4..7eae01d 100644 --- a/use/n/module.go +++ b/use/n/module.go @@ -8,7 +8,7 @@ package n import ( - "github.com/gocircuit/circuit/kit/module" + "github.com/hoijui/circuit/kit/module" "net" ) diff --git a/use/worker/worker.go b/use/worker/worker.go index 6909ec7..03cf60e 100644 --- a/use/worker/worker.go +++ b/use/worker/worker.go @@ -9,8 +9,8 @@ package worker import ( - "github.com/gocircuit/circuit/kit/module" - "github.com/gocircuit/circuit/use/n" + "github.com/hoijui/circuit/kit/module" + "github.com/hoijui/circuit/use/n" ) // Host is a location where a new worker can be executed. From c33f80793e09df9688573883c71ce3e093f1c781 Mon Sep 17 00:00:00 2001 From: hoijui Date: Mon, 27 Apr 2020 15:11:04 +0200 Subject: [PATCH 12/28] update to new version of dependency "github.com/urfave/cli" [fix] --- cmd/circuit/chan.go | 14 ++-- cmd/circuit/dns.go | 20 ++--- cmd/circuit/joinleave.go | 8 +- cmd/circuit/ls.go | 4 +- cmd/circuit/main.go | 162 +++++++++++++++++++-------------------- cmd/circuit/peek.go | 8 +- cmd/circuit/procdkr.go | 18 ++--- cmd/circuit/recv.go | 4 +- cmd/circuit/server.go | 18 ++--- cmd/circuit/std.go | 12 +-- 10 files changed, 134 insertions(+), 134 deletions(-) diff --git a/cmd/circuit/chan.go b/cmd/circuit/chan.go index 02b52b8..86c2f81 100644 --- a/cmd/circuit/chan.go +++ b/cmd/circuit/chan.go @@ -29,12 +29,12 @@ func mkchan(x *cli.Context) (err error) { c := dial(x) args := x.Args() - if len(args) != 2 { + if x.NArg() != 2 { return errors.New("mkchan needs an anchor and a capacity arguments") } - w, _ := parseGlob(args[0]) + w, _ := parseGlob(args.Get(0)) a := c.Walk(w) - n, err := strconv.Atoi(args[1]) + n, err := strconv.Atoi(args.Get(1)) if err != nil || n < 0 { return errors.New("second argument to mkchan must be a non-negative integral capacity") } @@ -53,10 +53,10 @@ func send(x *cli.Context) (err error) { c := dial(x) args := x.Args() - if len(args) != 1 { + if x.NArg() != 1 { return errors.New("send needs one anchor argument") } - w, _ := parseGlob(args[0]) + w, _ := parseGlob(args.Get(0)) u, ok := c.Walk(w).Get().(client.Chan) if !ok { return errors.New("not a channel") @@ -74,10 +74,10 @@ func send(x *cli.Context) (err error) { func clos(x *cli.Context) (err error) { c := dial(x) args := x.Args() - if len(args) != 1 { + if x.NArg() != 1 { return errors.New("close needs one anchor argument") } - w, _ := parseGlob(args[0]) + w, _ := parseGlob(args.Get(0)) u, ok := c.Walk(w).Get().(client.Chan) if !ok { return errors.New("not a channel") diff --git a/cmd/circuit/dns.go b/cmd/circuit/dns.go index 6724a3d..09fb472 100644 --- a/cmd/circuit/dns.go +++ b/cmd/circuit/dns.go @@ -23,14 +23,14 @@ func mkdns(x *cli.Context) (err error) { c := dial(x) args := x.Args() - if len(args) < 1 { + if x.NArg() < 1 { return errors.New("mkdns needs an anchor and an optional address arguments") } var addr string - if len(args) == 2 { - addr = args[1] + if x.NArg() == 2 { + addr = args.Get(1) } - w, _ := parseGlob(args[0]) + w, _ := parseGlob(args.Get(0)) if _, err = c.Walk(w).MakeNameserver(addr); err != nil { return errors.Wrapf(err, "mkdns error: %s", err) @@ -47,13 +47,13 @@ func nset(x *cli.Context) (err error) { c := dial(x) args := x.Args() - if len(args) != 2 { + if x.NArg() != 2 { return errors.New("set needs an anchor and a resource record arguments") } - w, _ := parseGlob(args[0]) + w, _ := parseGlob(args.Get(0)) switch u := c.Walk(w).Get().(type) { case client.Nameserver: - err := u.Set(args[1]) + err := u.Set(args.Get(1)) if err != nil { return errors.Wrapf(err, "set resoure record error: %v", err) } @@ -72,13 +72,13 @@ func nunset(x *cli.Context) (err error) { c := dial(x) args := x.Args() - if len(args) != 2 { + if x.NArg() != 2 { return errors.New("unset needs an anchor and a resource name arguments") } - w, _ := parseGlob(args[0]) + w, _ := parseGlob(args.Get(0)) switch u := c.Walk(w).Get().(type) { case client.Nameserver: - u.Unset(args[1]) + u.Unset(args.Get(1)) default: return errors.New("not a nameserver element") } diff --git a/cmd/circuit/joinleave.go b/cmd/circuit/joinleave.go index bcd4762..2bbc468 100644 --- a/cmd/circuit/joinleave.go +++ b/cmd/circuit/joinleave.go @@ -22,10 +22,10 @@ func mkonjoin(x *cli.Context) (err error) { c := dial(x) args := x.Args() - if len(args) != 1 { + if x.NArg() != 1 { return errors.New("mk@join needs an anchor argument") } - w, _ := parseGlob(args[0]) + w, _ := parseGlob(args.Get(0)) if _, err = c.Walk(w).MakeOnJoin(); err != nil { return errors.Wrapf(err, "mk@join error: %s", err) } @@ -42,10 +42,10 @@ func mkonleave(x *cli.Context) (err error) { c := dial(x) args := x.Args() - if len(args) != 1 { + if x.NArg() != 1 { return errors.New("mk@leave needs an anchor argument") } - w, _ := parseGlob(args[0]) + w, _ := parseGlob(args.Get(0)) if _, err = c.Walk(w).MakeOnLeave(); err != nil { return errors.Wrapf(err, "mk@leave error: %s", err) } diff --git a/cmd/circuit/ls.go b/cmd/circuit/ls.go index 70b2ead..b2f09ab 100644 --- a/cmd/circuit/ls.go +++ b/cmd/circuit/ls.go @@ -29,11 +29,11 @@ func ls(x *cli.Context) (err error) { }() c := dial(x) args := x.Args() - if len(args) != 1 { + if x.NArg() != 1 { println("ls needs a glob argument") os.Exit(1) } - w, ellipses := parseGlob(args[0]) + w, ellipses := parseGlob(args.Get(0)) list(0, "/", c.Walk(w), ellipses, x.Bool("long"), x.Bool("depth")) return } diff --git a/cmd/circuit/main.go b/cmd/circuit/main.go index 4b626f4..2e5b964 100644 --- a/cmd/circuit/main.go +++ b/cmd/circuit/main.go @@ -20,20 +20,20 @@ func main() { app := cli.NewApp() app.Name = "circuit" app.Usage = "Circuit server and client tool" - app.Commands = []cli.Command{ + app.Commands = []*cli.Command{ // circuit { Name: "start", Usage: "Run a circuit worker on this machine", Action: server, Flags: []cli.Flag{ - cli.StringFlag{Name: "addr, a", Value: "0.0.0.0:0", Usage: "Address of circuit server."}, - cli.StringFlag{Name: "if", Value: "", Usage: "Bind any available port on the specified interface."}, - cli.StringFlag{Name: "var", Value: "", Usage: "Lock and log directory for the circuit server."}, - cli.StringFlag{Name: "join, j", Value: "", Usage: "Join a circuit through a current member by address."}, - cli.StringFlag{Name: "hmac", Value: "", Usage: "File with HMAC credentials for HMAC/RC4 transport security.", EnvVar: "CIRCUIT_HMAC"}, - cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVar: "CIRCUIT_DISCOVER"}, - cli.BoolFlag{Name: "docker", Usage: "Enable docker elements; docker command must be executable"}, + &cli.StringFlag{Name: "addr, a", Value: "0.0.0.0:0", Usage: "Address of circuit server."}, + &cli.StringFlag{Name: "if", Value: "", Usage: "Bind any available port on the specified interface."}, + &cli.StringFlag{Name: "var", Value: "", Usage: "Lock and log directory for the circuit server."}, + &cli.StringFlag{Name: "join, j", Value: "", Usage: "Join a circuit through a current member by address."}, + &cli.StringFlag{Name: "hmac", Value: "", Usage: "File with HMAC credentials for HMAC/RC4 transport security.", EnvVars: []string{"CIRCUIT_HMAC"}}, + &cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVars: []string{"CIRCUIT_DISCOVER"}}, + &cli.BoolFlag{Name: "docker", Usage: "Enable docker elements; docker command must be executable"}, }, }, { @@ -46,11 +46,11 @@ func main() { Usage: "List circuit elements", Action: ls, Flags: []cli.Flag{ - cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, - cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVar: "CIRCUIT_DISCOVER"}, - cli.BoolFlag{Name: "long, l", Usage: "show detailed anchor information"}, - cli.BoolFlag{Name: "depth, de", Usage: "traverse anchors in depth-first order (leaves first)"}, - cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVar: "CIRCUIT_HMAC"}, + &cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, + &cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVars: []string{"CIRCUIT_DISCOVER"}}, + &cli.BoolFlag{Name: "long, l", Usage: "show detailed anchor information"}, + &cli.BoolFlag{Name: "depth, de", Usage: "traverse anchors in depth-first order (leaves first)"}, + &cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVars: []string{"CIRCUIT_HMAC"}}, }, }, // subscription-specific @@ -59,9 +59,9 @@ func main() { Usage: "Create a subscription element, receiving server join events", Action: mkonjoin, Flags: []cli.Flag{ - cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, - cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVar: "CIRCUIT_DISCOVER"}, - cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVar: "CIRCUIT_HMAC"}, + &cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, + &cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVars: []string{"CIRCUIT_DISCOVER"}}, + &cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVars: []string{"CIRCUIT_HMAC"}}, }, }, { @@ -69,9 +69,9 @@ func main() { Usage: "Create a subscription element, receiving server leave events", Action: mkonleave, Flags: []cli.Flag{ - cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, - cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVar: "CIRCUIT_DISCOVER"}, - cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVar: "CIRCUIT_HMAC"}, + &cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, + &cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVars: []string{"CIRCUIT_DISCOVER"}}, + &cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVars: []string{"CIRCUIT_HMAC"}}, }, }, // server-specific @@ -80,9 +80,9 @@ func main() { Usage: "Print the runtime stack trace of a server element", Action: stack, Flags: []cli.Flag{ - cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, - cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVar: "CIRCUIT_DISCOVER"}, - cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVar: "CIRCUIT_HMAC"}, + &cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, + &cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVars: []string{"CIRCUIT_DISCOVER"}}, + &cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVars: []string{"CIRCUIT_HMAC"}}, }, }, { @@ -90,9 +90,9 @@ func main() { Usage: "Merge the networks of this circuit server and that of the argument circuit address", Action: join, Flags: []cli.Flag{ - cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, - cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVar: "CIRCUIT_DISCOVER"}, - cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVar: "CIRCUIT_HMAC"}, + &cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, + &cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVars: []string{"CIRCUIT_DISCOVER"}}, + &cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVars: []string{"CIRCUIT_HMAC"}}, }, }, { @@ -100,9 +100,9 @@ func main() { Usage: "Kill a chosen circuit daemon", Action: stack, Flags: []cli.Flag{ - cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, - cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVar: "CIRCUIT_DISCOVER"}, - cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVar: "CIRCUIT_HMAC"}, + &cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, + &cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVars: []string{"CIRCUIT_DISCOVER"}}, + &cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVars: []string{"CIRCUIT_HMAC"}}, }, }, // channel-specific @@ -111,9 +111,9 @@ func main() { Usage: "Create a channel element", Action: mkchan, Flags: []cli.Flag{ - cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, - cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVar: "CIRCUIT_DISCOVER"}, - cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVar: "CIRCUIT_HMAC"}, + &cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, + &cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVars: []string{"CIRCUIT_DISCOVER"}}, + &cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVars: []string{"CIRCUIT_HMAC"}}, }, }, { @@ -121,9 +121,9 @@ func main() { Usage: "Send data to the channel from standard input", Action: send, Flags: []cli.Flag{ - cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, - cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVar: "CIRCUIT_DISCOVER"}, - cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVar: "CIRCUIT_HMAC"}, + &cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, + &cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVars: []string{"CIRCUIT_DISCOVER"}}, + &cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVars: []string{"CIRCUIT_HMAC"}}, }, }, { @@ -131,9 +131,9 @@ func main() { Usage: "Receive data from a channel or a subscription on stadard output", Action: recv, Flags: []cli.Flag{ - cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, - cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVar: "CIRCUIT_DISCOVER"}, - cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVar: "CIRCUIT_HMAC"}, + &cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, + &cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVars: []string{"CIRCUIT_DISCOVER"}}, + &cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVars: []string{"CIRCUIT_HMAC"}}, }, }, { @@ -141,9 +141,9 @@ func main() { Usage: "Close the channel after all current transmissions complete", Action: clos, Flags: []cli.Flag{ - cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, - cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVar: "CIRCUIT_DISCOVER"}, - cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVar: "CIRCUIT_HMAC"}, + &cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, + &cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVars: []string{"CIRCUIT_DISCOVER"}}, + &cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVars: []string{"CIRCUIT_HMAC"}}, }, }, // common @@ -152,9 +152,9 @@ func main() { Usage: "Abort and remove an element", Action: scrb, Flags: []cli.Flag{ - cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, - cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVar: "CIRCUIT_DISCOVER"}, - cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVar: "CIRCUIT_HMAC"}, + &cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, + &cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVars: []string{"CIRCUIT_DISCOVER"}}, + &cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVars: []string{"CIRCUIT_HMAC"}}, }, }, { @@ -162,9 +162,9 @@ func main() { Usage: "Query element state asynchronously", Action: peek, Flags: []cli.Flag{ - cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, - cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVar: "CIRCUIT_DISCOVER"}, - cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVar: "CIRCUIT_HMAC"}, + &cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, + &cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVars: []string{"CIRCUIT_DISCOVER"}}, + &cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVars: []string{"CIRCUIT_HMAC"}}, }, }, // nameserver @@ -173,9 +173,9 @@ func main() { Usage: "Create a nameserver element", Action: mkdns, Flags: []cli.Flag{ - cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, - cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVar: "CIRCUIT_DISCOVER"}, - cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVar: "CIRCUIT_HMAC"}, + &cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, + &cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVars: []string{"CIRCUIT_DISCOVER"}}, + &cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVars: []string{"CIRCUIT_HMAC"}}, }, }, { @@ -183,9 +183,9 @@ func main() { Usage: "Set a resource record in a nameserver element", Action: nset, Flags: []cli.Flag{ - cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, - cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVar: "CIRCUIT_DISCOVER"}, - cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVar: "CIRCUIT_HMAC"}, + &cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, + &cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVars: []string{"CIRCUIT_DISCOVER"}}, + &cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVars: []string{"CIRCUIT_HMAC"}}, }, }, { @@ -193,9 +193,9 @@ func main() { Usage: "Remove all resource records for a name in a nameserver element", Action: nunset, Flags: []cli.Flag{ - cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, - cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVar: "CIRCUIT_DISCOVER"}, - cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVar: "CIRCUIT_HMAC"}, + &cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, + &cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVars: []string{"CIRCUIT_DISCOVER"}}, + &cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVars: []string{"CIRCUIT_HMAC"}}, }, }, // proc/dkr-specific @@ -204,10 +204,10 @@ func main() { Usage: "Create a docker container element", Action: mkdkr, Flags: []cli.Flag{ - cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, - cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVar: "CIRCUIT_DISCOVER"}, - cli.BoolFlag{Name: "scrub", Usage: "scrub the process anchor automatically on exit"}, - cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVar: "CIRCUIT_HMAC"}, + &cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, + &cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVars: []string{"CIRCUIT_DISCOVER"}}, + &cli.BoolFlag{Name: "scrub", Usage: "scrub the process anchor automatically on exit"}, + &cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVars: []string{"CIRCUIT_HMAC"}}, }, }, { @@ -215,10 +215,10 @@ func main() { Usage: "Create a process element", Action: mkproc, Flags: []cli.Flag{ - cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, - cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVar: "CIRCUIT_DISCOVER"}, - cli.BoolFlag{Name: "scrub", Usage: "scrub the process anchor automatically on exit"}, - cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVar: "CIRCUIT_HMAC"}, + &cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, + &cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVars: []string{"CIRCUIT_DISCOVER"}}, + &cli.BoolFlag{Name: "scrub", Usage: "scrub the process anchor automatically on exit"}, + &cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVars: []string{"CIRCUIT_HMAC"}}, }, }, { @@ -226,9 +226,9 @@ func main() { Usage: "Send a signal to a running process", Action: sgnl, Flags: []cli.Flag{ - cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, - cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVar: "CIRCUIT_DISCOVER"}, - cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVar: "CIRCUIT_HMAC"}, + &cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, + &cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVars: []string{"CIRCUIT_DISCOVER"}}, + &cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVars: []string{"CIRCUIT_HMAC"}}, }, }, { @@ -236,9 +236,9 @@ func main() { Usage: "Wait until a process exits", Action: wait, Flags: []cli.Flag{ - cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, - cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVar: "CIRCUIT_DISCOVER"}, - cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVar: "CIRCUIT_HMAC"}, + &cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, + &cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVars: []string{"CIRCUIT_DISCOVER"}}, + &cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVars: []string{"CIRCUIT_HMAC"}}, }, }, { @@ -246,9 +246,9 @@ func main() { Usage: "Wait until a set of processes all exit", Action: waitall, Flags: []cli.Flag{ - cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, - cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVar: "CIRCUIT_DISCOVER"}, - cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVar: "CIRCUIT_HMAC"}, + &cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, + &cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVars: []string{"CIRCUIT_DISCOVER"}}, + &cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVars: []string{"CIRCUIT_HMAC"}}, }, }, // stdin, stdout, stderr @@ -257,9 +257,9 @@ func main() { Usage: "Forward this tool's standard input to that of the process", Action: stdin, Flags: []cli.Flag{ - cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, - cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVar: "CIRCUIT_DISCOVER"}, - cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVar: "CIRCUIT_HMAC"}, + &cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, + &cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVars: []string{"CIRCUIT_DISCOVER"}}, + &cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVars: []string{"CIRCUIT_HMAC"}}, }, }, { @@ -267,9 +267,9 @@ func main() { Usage: "Forward the standard output of the process to the standard output of this tool", Action: stdout, Flags: []cli.Flag{ - cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, - cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVar: "CIRCUIT_DISCOVER"}, - cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVar: "CIRCUIT_HMAC"}, + &cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, + &cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVars: []string{"CIRCUIT_DISCOVER"}}, + &cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVars: []string{"CIRCUIT_HMAC"}}, }, }, { @@ -277,9 +277,9 @@ func main() { Usage: "Forward the standard error of the process to the standard output of this tool", Action: stderr, Flags: []cli.Flag{ - cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, - cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVar: "CIRCUIT_DISCOVER"}, - cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVar: "CIRCUIT_HMAC"}, + &cli.StringFlag{Name: "dial, d", Value: "", Usage: "circuit member to dial into"}, + &cli.StringFlag{Name: "discover", Value: "228.8.8.8:8822", Usage: "Multicast address for peer server discovery", EnvVars: []string{"CIRCUIT_DISCOVER"}}, + &cli.StringFlag{Name: "hmac", Value: "", Usage: "File containing HMAC credentials. Use RC4 encryption.", EnvVars: []string{"CIRCUIT_HMAC"}}, }, }, } diff --git a/cmd/circuit/peek.go b/cmd/circuit/peek.go index d8a1b77..a0d80cb 100644 --- a/cmd/circuit/peek.go +++ b/cmd/circuit/peek.go @@ -28,10 +28,10 @@ func peek(x *cli.Context) (err error) { c := dial(x) args := x.Args() - if len(args) != 1 { + if x.NArg() != 1 { return errors.New("peek needs one anchor argument") } - w, _ := parseGlob(args[0]) + w, _ := parseGlob(args.Get(0)) switch t := c.Walk(w).Get().(type) { case client.Server: buf, _ := json.MarshalIndent(t.Peek(), "", "\t") @@ -73,10 +73,10 @@ func scrb(x *cli.Context) (err error) { c := dial(x) args := x.Args() - if len(args) != 1 { + if x.NArg() != 1 { return errors.New("scrub needs one anchor argument") } - w, _ := parseGlob(args[0]) + w, _ := parseGlob(args.Get(0)) c.Walk(w).Scrub() return } diff --git a/cmd/circuit/procdkr.go b/cmd/circuit/procdkr.go index bb81a33..44c3f52 100644 --- a/cmd/circuit/procdkr.go +++ b/cmd/circuit/procdkr.go @@ -32,10 +32,10 @@ func mkproc(x *cli.Context) (err error) { }() c := dial(x) args := x.Args() - if len(args) != 1 { + if x.NArg() != 1 { return errors.New("mkproc needs an anchor argument") } - w, _ := parseGlob(args[0]) + w, _ := parseGlob(args.Get(0)) buf, _ := ioutil.ReadAll(os.Stdin) var cmd client.Cmd if err = json.Unmarshal(buf, &cmd); err != nil { @@ -64,10 +64,10 @@ func mkdkr(x *cli.Context) (err error) { c := dial(x) args := x.Args() - if len(args) != 1 { + if x.NArg() != 1 { return errors.New("mkdkr needs an anchor argument") } - w, _ := parseGlob(args[0]) + w, _ := parseGlob(args.Get(0)) buf, _ := ioutil.ReadAll(os.Stdin) var run docker.Run if err = json.Unmarshal(buf, &run); err != nil { @@ -92,17 +92,17 @@ func sgnl(x *cli.Context) (err error) { c := dial(x) args := x.Args() - if len(args) != 2 { + if x.NArg() != 2 { return errors.New("signal needs an anchor and a signal name arguments") } - w, _ := parseGlob(args[1]) + w, _ := parseGlob(args.Get(1)) u, ok := c.Walk(w).Get().(interface { Signal(string) error }) if !ok { return errors.New("anchor is not a process or a docker container") } - if err = u.Signal(args[0]); err != nil { + if err = u.Signal(args.Get(0)); err != nil { return errors.Wrapf(err, "signal error: %v", err) } return @@ -117,10 +117,10 @@ func wait(x *cli.Context) (err error) { c := dial(x) args := x.Args() - if len(args) != 1 { + if x.NArg() != 1 { return errors.New("wait needs one anchor argument") } - w, _ := parseGlob(args[0]) + w, _ := parseGlob(args.Get(0)) var stat interface{} switch u := c.Walk(w).Get().(type) { diff --git a/cmd/circuit/recv.go b/cmd/circuit/recv.go index f99c16c..1b39b7a 100644 --- a/cmd/circuit/recv.go +++ b/cmd/circuit/recv.go @@ -27,10 +27,10 @@ func recv(x *cli.Context) (err error) { c := dial(x) args := x.Args() - if len(args) != 1 { + if x.NArg() != 1 { return errors.New("recv needs one anchor argument") } - w, _ := parseGlob(args[0]) + w, _ := parseGlob(args.Get(0)) switch u := c.Walk(w).Get().(type) { case client.Chan: msgr, err := u.Recv() diff --git a/cmd/circuit/server.go b/cmd/circuit/server.go index 8675bce..a6db70c 100644 --- a/cmd/circuit/server.go +++ b/cmd/circuit/server.go @@ -28,10 +28,10 @@ func stack(x *cli.Context) (err error) { c := dial(x) args := x.Args() - if len(args) != 1 { + if x.NArg() != 1 { return errors.New("recv needs one anchor argument") } - w, _ := parseGlob(args[0]) + w, _ := parseGlob(args.Get(0)) switch u := c.Walk(w).Get().(type) { case client.Server: r, err := u.Profile("goroutine") @@ -54,10 +54,10 @@ func suicide(x *cli.Context) (err error) { c := dial(x) args := x.Args() - if len(args) != 1 { + if x.NArg() != 1 { return errors.New("suicide needs one server anchor argument") } - w, _ := parseGlob(args[0]) + w, _ := parseGlob(args.Get(0)) u, ok := c.Walk(w).Get().(client.Server) if !ok { return errors.New("not a server") @@ -74,18 +74,18 @@ func join(x *cli.Context) (err error) { }() c := dial(x) args := x.Args() - if len(args) != 2 { + if x.NArg() != 2 { return errors.New("join needs one anchor argument and one circuit address argument") } // Verify the target circuit address is valid - if _, err = n.ParseAddr(args[1]); err != nil { - return errors.Wrapf(err, "argument %q is not a valid circuit address", args[1]) + if _, err = n.ParseAddr(args.Get(1)); err != nil { + return errors.Wrapf(err, "argument %q is not a valid circuit address", args.Get(1)) } // - w, _ := parseGlob(args[0]) + w, _ := parseGlob(args.Get(0)) switch u := c.Walk(w).Get().(type) { case client.Server: - if err = u.Rejoin(args[1]); err != nil { + if err = u.Rejoin(args.Get(1)); err != nil { return errors.Wrapf(err, "error: %v", err) } default: diff --git a/cmd/circuit/std.go b/cmd/circuit/std.go index 0cfe9ea..7d226e8 100644 --- a/cmd/circuit/std.go +++ b/cmd/circuit/std.go @@ -24,10 +24,10 @@ func stdin(x *cli.Context) (err error) { c := dial(x) args := x.Args() - if len(args) != 1 { + if x.NArg() != 1 { return errors.New("stdin needs one anchor argument") } - w, _ := parseGlob(args[0]) + w, _ := parseGlob(args.Get(0)) u, ok := c.Walk(w).Get().(interface { Stdin() io.WriteCloser }) @@ -53,10 +53,10 @@ func stdout(x *cli.Context) (err error) { c := dial(x) args := x.Args() - if len(args) != 1 { + if x.NArg() != 1 { return errors.New("stdout needs one anchor argument") } - w, _ := parseGlob(args[0]) + w, _ := parseGlob(args.Get(0)) u, ok := c.Walk(w).Get().(interface { Stdout() io.ReadCloser }) @@ -76,10 +76,10 @@ func stderr(x *cli.Context) (err error) { c := dial(x) args := x.Args() - if len(args) != 1 { + if x.NArg() != 1 { return errors.New("stderr needs one anchor argument") } - w, _ := parseGlob(args[0]) + w, _ := parseGlob(args.Get(0)) u, ok := c.Walk(w).Get().(interface { Stderr() io.ReadCloser }) From e3cf465b990ea3dac68843643fd35ccef32d4f89 Mon Sep 17 00:00:00 2001 From: hoijui Date: Fri, 1 May 2020 07:13:04 +0200 Subject: [PATCH 13/28] convert into a go _module_ (and use modules (style) imports) --- cmd/circuit/chan.go | 2 +- cmd/circuit/dns.go | 2 +- cmd/circuit/hmac.go | 2 +- cmd/circuit/joinleave.go | 2 +- cmd/circuit/ls.go | 2 +- cmd/circuit/main.go | 2 +- cmd/circuit/peek.go | 2 +- cmd/circuit/procdkr.go | 2 +- cmd/circuit/recv.go | 2 +- cmd/circuit/server.go | 2 +- cmd/circuit/start.go | 2 +- cmd/circuit/std.go | 2 +- cmd/circuit/util.go | 2 +- cmd/circuit/wait.go | 2 +- go.mod | 14 ++++++++++++ go.sum | 48 ++++++++++++++++++++++++++++++++++++++++ 16 files changed, 76 insertions(+), 14 deletions(-) create mode 100644 go.mod create mode 100644 go.sum diff --git a/cmd/circuit/chan.go b/cmd/circuit/chan.go index 86c2f81..7651043 100644 --- a/cmd/circuit/chan.go +++ b/cmd/circuit/chan.go @@ -16,7 +16,7 @@ import ( "github.com/hoijui/circuit/client" "github.com/pkg/errors" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) // circuit mkchan /X1234/hola/charlie 0 diff --git a/cmd/circuit/dns.go b/cmd/circuit/dns.go index 09fb472..158ceb4 100644 --- a/cmd/circuit/dns.go +++ b/cmd/circuit/dns.go @@ -11,7 +11,7 @@ import ( "github.com/hoijui/circuit/client" "github.com/pkg/errors" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) func mkdns(x *cli.Context) (err error) { diff --git a/cmd/circuit/hmac.go b/cmd/circuit/hmac.go index 53b956f..64512fe 100644 --- a/cmd/circuit/hmac.go +++ b/cmd/circuit/hmac.go @@ -14,7 +14,7 @@ import ( "math/rand" "time" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) func keygen(c *cli.Context) (err error) { diff --git a/cmd/circuit/joinleave.go b/cmd/circuit/joinleave.go index 2bbc468..6d53ef8 100644 --- a/cmd/circuit/joinleave.go +++ b/cmd/circuit/joinleave.go @@ -9,7 +9,7 @@ package main import ( "github.com/pkg/errors" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) // circuit mk@join /X1234/hola/listy diff --git a/cmd/circuit/ls.go b/cmd/circuit/ls.go index b2f09ab..07e7af1 100644 --- a/cmd/circuit/ls.go +++ b/cmd/circuit/ls.go @@ -16,7 +16,7 @@ import ( "github.com/hoijui/circuit/client" "github.com/hoijui/circuit/client/docker" "github.com/pkg/errors" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) // circuit ls /Q123/apps/charlie diff --git a/cmd/circuit/main.go b/cmd/circuit/main.go index 2e5b964..2cb5ad6 100644 --- a/cmd/circuit/main.go +++ b/cmd/circuit/main.go @@ -12,7 +12,7 @@ import ( "log" "os" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) func main() { diff --git a/cmd/circuit/peek.go b/cmd/circuit/peek.go index a0d80cb..961daa5 100644 --- a/cmd/circuit/peek.go +++ b/cmd/circuit/peek.go @@ -15,7 +15,7 @@ import ( "github.com/hoijui/circuit/client/docker" "github.com/pkg/errors" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) // circuit peek /X1234/hola/charlie diff --git a/cmd/circuit/procdkr.go b/cmd/circuit/procdkr.go index 44c3f52..c29ffdb 100644 --- a/cmd/circuit/procdkr.go +++ b/cmd/circuit/procdkr.go @@ -17,7 +17,7 @@ import ( "github.com/hoijui/circuit/client/docker" "github.com/pkg/errors" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) // circuit mkproc /X1234/hola/charlie << EOF diff --git a/cmd/circuit/recv.go b/cmd/circuit/recv.go index 1b39b7a..2dbb73b 100644 --- a/cmd/circuit/recv.go +++ b/cmd/circuit/recv.go @@ -15,7 +15,7 @@ import ( "github.com/hoijui/circuit/client" "github.com/pkg/errors" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) func recv(x *cli.Context) (err error) { diff --git a/cmd/circuit/server.go b/cmd/circuit/server.go index a6db70c..58b60eb 100644 --- a/cmd/circuit/server.go +++ b/cmd/circuit/server.go @@ -16,7 +16,7 @@ import ( "github.com/hoijui/circuit/client" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) func stack(x *cli.Context) (err error) { diff --git a/cmd/circuit/start.go b/cmd/circuit/start.go index 81af4e1..691ce4c 100644 --- a/cmd/circuit/start.go +++ b/cmd/circuit/start.go @@ -23,7 +23,7 @@ import ( "github.com/hoijui/circuit/use/n" "github.com/pkg/errors" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) func server(c *cli.Context) (err error) { diff --git a/cmd/circuit/std.go b/cmd/circuit/std.go index 7d226e8..3ae7279 100644 --- a/cmd/circuit/std.go +++ b/cmd/circuit/std.go @@ -12,7 +12,7 @@ import ( "os" "github.com/pkg/errors" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) func stdin(x *cli.Context) (err error) { diff --git a/cmd/circuit/util.go b/cmd/circuit/util.go index 625c231..3b21070 100644 --- a/cmd/circuit/util.go +++ b/cmd/circuit/util.go @@ -15,7 +15,7 @@ import ( "strings" "github.com/hoijui/circuit/client" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) func fatalf(format string, arg ...interface{}) { diff --git a/cmd/circuit/wait.go b/cmd/circuit/wait.go index f0010bf..c089d9d 100644 --- a/cmd/circuit/wait.go +++ b/cmd/circuit/wait.go @@ -15,7 +15,7 @@ import ( "github.com/hoijui/circuit/client" "github.com/hoijui/circuit/client/docker" "github.com/pkg/errors" - "github.com/urfave/cli" + "github.com/urfave/cli/v2" ) func waitall(x *cli.Context) (err error) { diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..922dc84 --- /dev/null +++ b/go.mod @@ -0,0 +1,14 @@ +module github.com/hoijui/circuit + +go 1.12 + +require ( + github.com/google/pprof v0.0.0-20200427200659-8f1c0db96fd2 // indirect + github.com/ianlancetaylor/demangle v0.0.0-20200414190113-039b1ae3a340 // indirect + github.com/pkg/errors v0.9.1 + github.com/urfave/cli/v2 v2.2.0 + golang.org/x/arch v0.0.0-20200312215426-ff8b605520f4 // indirect + golang.org/x/crypto v0.0.0-20200427165652-729f1e841bcc // indirect + golang.org/x/sys v0.0.0-20200427175716-29b57079015a // indirect + golang.org/x/tools v0.0.0-20200428021058-7ae4988eb4d9 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..fb33a5c --- /dev/null +++ b/go.sum @@ -0,0 +1,48 @@ +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/google/pprof v0.0.0-20200427200659-8f1c0db96fd2 h1:lKbWzx0zMrpDN7fUAoopegfxFfQKzkStHsKRoMa+Ogo= +github.com/google/pprof v0.0.0-20200427200659-8f1c0db96fd2/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200414190113-039b1ae3a340 h1:S1+yTUaFPXuDZnPDbO+TrDFIjPzQraYH8/CwSlu9Fac= +github.com/ianlancetaylor/demangle v0.0.0-20200414190113-039b1ae3a340/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/urfave/cli/v2 v2.2.0 h1:JTTnM6wKzdA0Jqodd966MVj4vWbbquZykeX1sKbe2C4= +github.com/urfave/cli/v2 v2.2.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +golang.org/x/arch v0.0.0-20200312215426-ff8b605520f4 h1:cZG+Ns0n5bdEEsURGnDinFswSebRNMqspbLvxrLZoIc= +golang.org/x/arch v0.0.0-20200312215426-ff8b605520f4/go.mod h1:flIaEI6LNU6xOCD5PaJvn9wGP0agmIOqjrtsKGRguv4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200427165652-729f1e841bcc h1:ZGI/fILM2+ueot/UixBSoj9188jCAxVHEZEGhqq67I4= +golang.org/x/crypto v0.0.0-20200427165652-729f1e841bcc/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200427175716-29b57079015a h1:08u6b1caTT9MQY4wSbmsd4Ulm6DmgNYnbImBuZjGJow= +golang.org/x/sys v0.0.0-20200427175716-29b57079015a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200428021058-7ae4988eb4d9 h1:nSSuQTxk9hjYf2koTs9mHZtYm2pu7Yt8WuIeKOrCWNI= +golang.org/x/tools v0.0.0-20200428021058-7ae4988eb4d9/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= From e8a78327f77c143ab7fc54fcfb5932ccae3de3e6 Mon Sep 17 00:00:00 2001 From: hoijui Date: Fri, 1 May 2020 11:31:21 +0200 Subject: [PATCH 14/28] remove the Makefile (use `go install -v ./cmd/circuit/` instead) --- Makefile | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 Makefile diff --git a/Makefile b/Makefile deleted file mode 100644 index dbf409e..0000000 --- a/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -nix: - cd cmd/circuit && go install - -clean: - rm $(GOPATH)/bin/circuit - From b8a4f78e384fd32f320fbd5b1dbf43292b2de475 Mon Sep 17 00:00:00 2001 From: hoijui Date: Fri, 1 May 2020 11:53:59 +0200 Subject: [PATCH 15/28] move packages from repo root to pkg --- cmd/circuit/chan.go | 2 +- cmd/circuit/dns.go | 2 +- cmd/circuit/load.go | 12 +++++------ cmd/circuit/load_windows.go | 10 +++++----- cmd/circuit/ls.go | 4 ++-- cmd/circuit/peek.go | 4 ++-- cmd/circuit/procdkr.go | 4 ++-- cmd/circuit/recv.go | 2 +- cmd/circuit/server.go | 4 ++-- cmd/circuit/start.go | 12 +++++------ cmd/circuit/util.go | 2 +- cmd/circuit/wait.go | 4 ++-- gocircuit.org/api/api.go | 2 +- gocircuit.org/api/connect.go | 2 +- gocircuit.org/api/container.go | 2 +- gocircuit.org/build/index.go | 2 +- gocircuit.org/man/cmd.go | 2 +- gocircuit.org/man/element-process.go | 2 +- gocircuit.org/tutorial/mysql-nodejs/app.go | 4 ++-- {anchor => pkg/anchor}/anchor.go | 0 {anchor => pkg/anchor}/term.go | 16 +++++++-------- {anchor => pkg/anchor}/x.go | 16 +++++++-------- {client => pkg/client}/chan.go | 2 +- {client => pkg/client}/client.go | 20 +++++++++---------- {client => pkg/client}/dns.go | 2 +- {client => pkg/client}/docker/docker.go | 0 {client => pkg/client}/docker/run.go | 0 {client => pkg/client}/docker/stat.go | 0 {client => pkg/client}/proc.go | 2 +- {client => pkg/client}/server.go | 2 +- {client => pkg/client}/subscription.go | 2 +- {client => pkg/client}/term.go | 20 +++++++++---------- {element => pkg/element}/_mesos/mesos.go | 2 +- {element => pkg/element}/dns/_m.go | 0 {element => pkg/element}/dns/dns.go | 2 +- {element => pkg/element}/dns/probe.sh | 0 {element => pkg/element}/dns/stat.go | 0 {element => pkg/element}/dns/x.go | 4 ++-- .../element}/docker/_docker_test.go | 2 +- {element => pkg/element}/docker/docker.go | 10 +++++----- {element => pkg/element}/docker/util.go | 0 {element => pkg/element}/docker/x.go | 8 ++++---- {element => pkg/element}/proc/cmd.go | 0 {element => pkg/element}/proc/proc.go | 4 ++-- {element => pkg/element}/proc/stat.go | 0 {element => pkg/element}/proc/stat_sigmap.go | 0 .../element}/proc/stat_sigmap_windows.go | 0 {element => pkg/element}/proc/x.go | 6 +++--- {element => pkg/element}/server/srv.go | 8 ++++---- {element => pkg/element}/server/x.go | 6 +++--- {element => pkg/element}/valve/ops.go | 2 +- {element => pkg/element}/valve/valve.go | 2 +- {element => pkg/element}/valve/x.go | 6 +++--- {kit => pkg/kit}/assemble/assemble.go | 6 +++--- {kit => pkg/kit}/assemble/dialback.go | 4 ++-- {kit => pkg/kit}/assemble/discover_test.go | 2 +- {kit => pkg/kit}/assemble/gather.go | 2 +- {kit => pkg/kit}/assemble/lens.go | 2 +- {kit => pkg/kit}/assemble/scatter.go | 2 +- {kit => pkg/kit}/assemble/trace.go | 0 {kit => pkg/kit}/config/config.go | 0 {kit => pkg/kit}/config/config_test.go | 0 {kit => pkg/kit}/debug/ctrlc/init.go | 2 +- {kit => pkg/kit}/debug/http/http.go | 0 {kit => pkg/kit}/debug/http/trace/trace.go | 0 {kit => pkg/kit}/debug/kill/init.go | 2 +- {kit => pkg/kit}/debug/sigpanic.go | 0 .../kit}/debug/sigpanic_save_panic_trace.go | 0 .../sigpanic_save_panic_trace_windows.go | 0 {kit => pkg/kit}/debug/syscall_wrapper.go | 0 {kit => pkg/kit}/debug/syscall_wrapper_arm.go | 0 {kit => pkg/kit}/fmt/deep.go | 0 {kit => pkg/kit}/fmt/deep_test.go | 0 {kit => pkg/kit}/fmt/fmtbytes.go | 0 {kit => pkg/kit}/interruptible/intr.go | 0 {kit => pkg/kit}/interruptible/mutex.go | 0 {kit => pkg/kit}/interruptible/pipe.go | 0 {kit => pkg/kit}/interruptible/pipe_test.go | 0 {kit => pkg/kit}/interruptible/reader.go | 0 {kit => pkg/kit}/interruptible/writer.go | 0 {kit => pkg/kit}/iomisc/combine.go | 0 {kit => pkg/kit}/iomisc/dup.go | 0 {kit => pkg/kit}/iomisc/dup_test.go | 0 {kit => pkg/kit}/iomisc/eofcloser.go | 0 {kit => pkg/kit}/iomisc/multi.go | 0 {kit => pkg/kit}/iomisc/prefix.go | 0 {kit => pkg/kit}/iomisc/prefix_test.go | 0 {kit => pkg/kit}/iomisc/sniffer.go | 2 +- {kit => pkg/kit}/kit.go | 0 {kit => pkg/kit}/lang/hash.go | 0 {kit => pkg/kit}/lang/hash_test.go | 0 {kit => pkg/kit}/llrb/ORIGIN | 0 {kit => pkg/kit}/llrb/avgvar.go | 0 {kit => pkg/kit}/llrb/llrb-stats.go | 0 {kit => pkg/kit}/llrb/llrb.go | 0 {kit => pkg/kit}/llrb/llrb_test.go | 0 {kit => pkg/kit}/lockfile/lockfile.go | 0 {kit => pkg/kit}/lockfile/lockfile_test.go | 0 {kit => pkg/kit}/module/slot.go | 0 {kit => pkg/kit}/posix/posix.go | 0 {kit => pkg/kit}/posix/shell.go | 2 +- {kit => pkg/kit}/pty/License | 0 {kit => pkg/kit}/pty/ORIGIN | 0 {kit => pkg/kit}/pty/README.md | 0 {kit => pkg/kit}/pty/doc.go | 0 {kit => pkg/kit}/pty/pty_darwin.go | 0 {kit => pkg/kit}/pty/pty_linux.go | 0 {kit => pkg/kit}/pty/run.go | 0 {kit => pkg/kit}/pty/util.go | 0 {kit => pkg/kit}/pubsub/lossyring.go | 0 {kit => pkg/kit}/pubsub/lossyring_test.go | 0 {kit => pkg/kit}/pubsub/pubsub.go | 2 +- {kit => pkg/kit}/sched/limiter/l.go | 0 {kit => pkg/kit}/sched/limiter/l_test.go | 0 {kit => pkg/kit}/sched/quota.go | 0 {kit => pkg/kit}/sched/sched.go | 0 {kit => pkg/kit}/shell/shell.go | 8 ++++---- {kit => pkg/kit}/shell/shell_test.go | 0 {kit => pkg/kit}/stat/histogram.go | 0 {kit => pkg/kit}/stat/moment.go | 0 {kit => pkg/kit}/stat/sliding.go | 0 {kit => pkg/kit}/stat/sliding_test.go | 0 {kit => pkg/kit}/stat/time.go | 0 .../kit}/symbolizer/_symbolizer_test.go | 0 {kit => pkg/kit}/symbolizer/simplify.go | 0 {kit => pkg/kit}/symbolizer/symbolizer.go | 0 {kit => pkg/kit}/sync/trigger.go | 0 {kit => pkg/kit}/sync/until.go | 0 {kit => pkg/kit}/tele/LICENSE | 0 {kit => pkg/kit}/tele/blend/_blend_test.go | 12 +++++------ {kit => pkg/kit}/tele/blend/_close_test.go | 12 +++++------ {kit => pkg/kit}/tele/blend/conn.go | 0 {kit => pkg/kit}/tele/blend/dialer.go | 4 ++-- {kit => pkg/kit}/tele/blend/error.go | 0 {kit => pkg/kit}/tele/blend/listener.go | 4 ++-- {kit => pkg/kit}/tele/blend/msg.go | 0 {kit => pkg/kit}/tele/blend/session.go | 4 ++-- {kit => pkg/kit}/tele/blend/transport.go | 4 ++-- {kit => pkg/kit}/tele/codec/_codec_test.go | 10 +++++----- {kit => pkg/kit}/tele/codec/codec.go | 0 {kit => pkg/kit}/tele/codec/conn.go | 0 {kit => pkg/kit}/tele/codec/gob.go | 0 {kit => pkg/kit}/tele/codec/gob_test.go | 0 {kit => pkg/kit}/tele/codec/transport.go | 0 {kit => pkg/kit}/tele/doc.go | 0 {kit => pkg/kit}/tele/hmac/addr.go | 0 {kit => pkg/kit}/tele/hmac/codec.go | 4 ++-- {kit => pkg/kit}/tele/limiter/l.go | 0 {kit => pkg/kit}/tele/limiter/l_test.go | 0 {kit => pkg/kit}/tele/tcp/addr.go | 0 {kit => pkg/kit}/tele/tcp/codec.go | 4 ++-- {kit => pkg/kit}/tele/tele.go | 10 +++++----- {kit => pkg/kit}/tele/trace/fmt.go | 0 {kit => pkg/kit}/tele/trace/frame.go | 0 {kit => pkg/kit}/tele/trace/ticket.go | 0 {kit => pkg/kit}/term/MAINTAINERS | 0 {kit => pkg/kit}/term/ORIGIN | 0 {kit => pkg/kit}/term/term.go | 0 {kit => pkg/kit}/term/termios_darwin.go | 0 {kit => pkg/kit}/term/termios_linux.go | 0 {kit => pkg/kit}/x/doc.go | 0 {kit => pkg/kit}/x/exec/exec.go | 8 ++++---- {kit => pkg/kit}/x/file/file.go | 4 ++-- {kit => pkg/kit}/x/file/fileinfo.go | 0 {kit => pkg/kit}/x/io/io.go | 4 ++-- {kit => pkg/kit}/xor/util.go | 0 {kit => pkg/kit}/xor/xor.go | 0 {kit => pkg/kit}/xor/xor_test.go | 0 {sys => pkg/sys}/acid/acid.go | 4 ++-- {sys => pkg/sys}/acid/behalf.go | 2 +- {sys => pkg/sys}/lang/README | 0 {sys => pkg/sys}/lang/TODO | 0 {sys => pkg/sys}/lang/_ptrptr_test.go | 0 {sys => pkg/sys}/lang/_runtime_test.go | 4 ++-- {sys => pkg/sys}/lang/call.go | 2 +- {sys => pkg/sys}/lang/dial.go | 6 +++--- {sys => pkg/sys}/lang/doc.go | 2 +- {sys => pkg/sys}/lang/error.go | 0 {sys => pkg/sys}/lang/exp.go | 6 +++--- {sys => pkg/sys}/lang/flat.go | 0 {sys => pkg/sys}/lang/freeze.go | 0 {sys => pkg/sys}/lang/freeze_test.go | 2 +- {sys => pkg/sys}/lang/func.go | 10 +++++----- {sys => pkg/sys}/lang/imp.go | 6 +++--- {sys => pkg/sys}/lang/lang.go | 6 +++--- {sys => pkg/sys}/lang/msg.go | 6 +++--- {sys => pkg/sys}/lang/perm.go | 0 {sys => pkg/sys}/lang/prof/profile.go | 2 +- {sys => pkg/sys}/lang/prof/stat.go | 0 {sys => pkg/sys}/lang/prof/stopwatch.go | 0 {sys => pkg/sys}/lang/ptrptr.go | 4 ++-- {sys => pkg/sys}/lang/readwriter.go | 2 +- {sys => pkg/sys}/lang/runtime.go | 10 +++++----- {sys => pkg/sys}/lang/sandbox.go | 2 +- {sys => pkg/sys}/lang/srv.go | 0 {sys => pkg/sys}/lang/types/gob.go | 0 {sys => pkg/sys}/lang/types/register.go | 0 {sys => pkg/sys}/lang/types/type.go | 0 {sys => pkg/sys}/lang/types/util.go | 0 {sys => pkg/sys}/lang/value.go | 2 +- {sys => pkg/sys}/lang/vexp.go | 2 +- {sys => pkg/sys}/lang/vimp.go | 2 +- {sys => pkg/sys}/lang/vrewrite.go | 0 {sys => pkg/sys}/lang/vrewrite_test.go | 0 {sys => pkg/sys}/sys.go | 0 {sys => pkg/sys}/tele/_tele_test.go | 2 +- {sys => pkg/sys}/tele/addr.go | 4 ++-- {sys => pkg/sys}/tele/conn.go | 4 ++-- {sys => pkg/sys}/tele/dialer.go | 6 +++--- {sys => pkg/sys}/tele/listener.go | 6 +++--- {sys => pkg/sys}/tele/transport.go | 6 +++--- {tissue => pkg/tissue}/doc.go | 0 {tissue => pkg/tissue}/exo.go | 0 {tissue => pkg/tissue}/folk.go | 2 +- {tissue => pkg/tissue}/kin.go | 6 +++--- {tissue => pkg/tissue}/locus/locus.go | 12 +++++------ {tissue => pkg/tissue}/locus/peer.go | 6 +++--- {tissue => pkg/tissue}/locus/x.go | 2 +- {tissue => pkg/tissue}/neighborhood.go | 2 +- {tissue => pkg/tissue}/tube/doc.go | 0 {tissue => pkg/tissue}/tube/record.go | 0 {tissue => pkg/tissue}/tube/tube.go | 8 ++++---- {tissue => pkg/tissue}/tube/view.go | 2 +- {tissue => pkg/tissue}/tube/x.go | 4 ++-- {tissue => pkg/tissue}/util.go | 4 ++-- {use => pkg/use}/anchorfs/anchorfs.go | 4 ++-- {use => pkg/use}/anchorfs/module.go | 2 +- {use => pkg/use}/circuit/lang.go | 2 +- {use => pkg/use}/circuit/module.go | 8 ++++---- {use => pkg/use}/circuit/runtime.go | 4 ++-- {use => pkg/use}/errors/errors.go | 0 {use => pkg/use}/n/id.go | 2 +- {use => pkg/use}/n/module.go | 2 +- {use => pkg/use}/n/transport.go | 0 {use => pkg/use}/use.go | 0 {use => pkg/use}/worker/worker.go | 4 ++-- tutorial/nodejs-using-mysql/start-app/main.go | 2 +- tutorial/wait-all/main.go | 2 +- tutorial/wait-first/main.go | 2 +- tutorial/watchbot-with-chan/main.go | 2 +- tutorial/watchbot/main.go | 2 +- 241 files changed, 269 insertions(+), 269 deletions(-) rename {anchor => pkg/anchor}/anchor.go (100%) rename {anchor => pkg/anchor}/term.go (92%) rename {anchor => pkg/anchor}/x.go (88%) rename {client => pkg/client}/chan.go (98%) rename {client => pkg/client}/client.go (91%) rename {client => pkg/client}/dns.go (95%) rename {client => pkg/client}/docker/docker.go (100%) rename {client => pkg/client}/docker/run.go (100%) rename {client => pkg/client}/docker/stat.go (100%) rename {client => pkg/client}/proc.go (98%) rename {client => pkg/client}/server.go (93%) rename {client => pkg/client}/subscription.go (96%) rename {client => pkg/client}/term.go (92%) rename {element => pkg/element}/_mesos/mesos.go (92%) rename {element => pkg/element}/dns/_m.go (100%) rename {element => pkg/element}/dns/dns.go (98%) rename {element => pkg/element}/dns/probe.sh (100%) rename {element => pkg/element}/dns/stat.go (100%) rename {element => pkg/element}/dns/x.go (89%) rename {element => pkg/element}/docker/_docker_test.go (92%) rename {element => pkg/element}/docker/docker.go (91%) rename {element => pkg/element}/docker/util.go (100%) rename {element => pkg/element}/docker/x.go (90%) rename {element => pkg/element}/proc/cmd.go (100%) rename {element => pkg/element}/proc/proc.go (97%) rename {element => pkg/element}/proc/stat.go (100%) rename {element => pkg/element}/proc/stat_sigmap.go (100%) rename {element => pkg/element}/proc/stat_sigmap_windows.go (100%) rename {element => pkg/element}/proc/x.go (93%) rename {element => pkg/element}/server/srv.go (89%) rename {element => pkg/element}/server/x.go (90%) rename {element => pkg/element}/valve/ops.go (97%) rename {element => pkg/element}/valve/valve.go (97%) rename {element => pkg/element}/valve/x.go (92%) rename {kit => pkg/kit}/assemble/assemble.go (93%) rename {kit => pkg/kit}/assemble/dialback.go (90%) rename {kit => pkg/kit}/assemble/discover_test.go (94%) rename {kit => pkg/kit}/assemble/gather.go (97%) rename {kit => pkg/kit}/assemble/lens.go (96%) rename {kit => pkg/kit}/assemble/scatter.go (96%) rename {kit => pkg/kit}/assemble/trace.go (100%) rename {kit => pkg/kit}/config/config.go (100%) rename {kit => pkg/kit}/config/config_test.go (100%) rename {kit => pkg/kit}/debug/ctrlc/init.go (87%) rename {kit => pkg/kit}/debug/http/http.go (100%) rename {kit => pkg/kit}/debug/http/trace/trace.go (100%) rename {kit => pkg/kit}/debug/kill/init.go (87%) rename {kit => pkg/kit}/debug/sigpanic.go (100%) rename {kit => pkg/kit}/debug/sigpanic_save_panic_trace.go (100%) rename {kit => pkg/kit}/debug/sigpanic_save_panic_trace_windows.go (100%) rename {kit => pkg/kit}/debug/syscall_wrapper.go (100%) rename {kit => pkg/kit}/debug/syscall_wrapper_arm.go (100%) rename {kit => pkg/kit}/fmt/deep.go (100%) rename {kit => pkg/kit}/fmt/deep_test.go (100%) rename {kit => pkg/kit}/fmt/fmtbytes.go (100%) rename {kit => pkg/kit}/interruptible/intr.go (100%) rename {kit => pkg/kit}/interruptible/mutex.go (100%) rename {kit => pkg/kit}/interruptible/pipe.go (100%) rename {kit => pkg/kit}/interruptible/pipe_test.go (100%) rename {kit => pkg/kit}/interruptible/reader.go (100%) rename {kit => pkg/kit}/interruptible/writer.go (100%) rename {kit => pkg/kit}/iomisc/combine.go (100%) rename {kit => pkg/kit}/iomisc/dup.go (100%) rename {kit => pkg/kit}/iomisc/dup_test.go (100%) rename {kit => pkg/kit}/iomisc/eofcloser.go (100%) rename {kit => pkg/kit}/iomisc/multi.go (100%) rename {kit => pkg/kit}/iomisc/prefix.go (100%) rename {kit => pkg/kit}/iomisc/prefix_test.go (100%) rename {kit => pkg/kit}/iomisc/sniffer.go (98%) rename {kit => pkg/kit}/kit.go (100%) rename {kit => pkg/kit}/lang/hash.go (100%) rename {kit => pkg/kit}/lang/hash_test.go (100%) rename {kit => pkg/kit}/llrb/ORIGIN (100%) rename {kit => pkg/kit}/llrb/avgvar.go (100%) rename {kit => pkg/kit}/llrb/llrb-stats.go (100%) rename {kit => pkg/kit}/llrb/llrb.go (100%) rename {kit => pkg/kit}/llrb/llrb_test.go (100%) rename {kit => pkg/kit}/lockfile/lockfile.go (100%) rename {kit => pkg/kit}/lockfile/lockfile_test.go (100%) rename {kit => pkg/kit}/module/slot.go (100%) rename {kit => pkg/kit}/posix/posix.go (100%) rename {kit => pkg/kit}/posix/shell.go (98%) rename {kit => pkg/kit}/pty/License (100%) rename {kit => pkg/kit}/pty/ORIGIN (100%) rename {kit => pkg/kit}/pty/README.md (100%) rename {kit => pkg/kit}/pty/doc.go (100%) rename {kit => pkg/kit}/pty/pty_darwin.go (100%) rename {kit => pkg/kit}/pty/pty_linux.go (100%) rename {kit => pkg/kit}/pty/run.go (100%) rename {kit => pkg/kit}/pty/util.go (100%) rename {kit => pkg/kit}/pubsub/lossyring.go (100%) rename {kit => pkg/kit}/pubsub/lossyring_test.go (100%) rename {kit => pkg/kit}/pubsub/pubsub.go (99%) rename {kit => pkg/kit}/sched/limiter/l.go (100%) rename {kit => pkg/kit}/sched/limiter/l_test.go (100%) rename {kit => pkg/kit}/sched/quota.go (100%) rename {kit => pkg/kit}/sched/sched.go (100%) rename {kit => pkg/kit}/shell/shell.go (92%) rename {kit => pkg/kit}/shell/shell_test.go (100%) rename {kit => pkg/kit}/stat/histogram.go (100%) rename {kit => pkg/kit}/stat/moment.go (100%) rename {kit => pkg/kit}/stat/sliding.go (100%) rename {kit => pkg/kit}/stat/sliding_test.go (100%) rename {kit => pkg/kit}/stat/time.go (100%) rename {kit => pkg/kit}/symbolizer/_symbolizer_test.go (100%) rename {kit => pkg/kit}/symbolizer/simplify.go (100%) rename {kit => pkg/kit}/symbolizer/symbolizer.go (100%) rename {kit => pkg/kit}/sync/trigger.go (100%) rename {kit => pkg/kit}/sync/until.go (100%) rename {kit => pkg/kit}/tele/LICENSE (100%) rename {kit => pkg/kit}/tele/blend/_blend_test.go (85%) rename {kit => pkg/kit}/tele/blend/_close_test.go (79%) rename {kit => pkg/kit}/tele/blend/conn.go (100%) rename {kit => pkg/kit}/tele/blend/dialer.go (88%) rename {kit => pkg/kit}/tele/blend/error.go (100%) rename {kit => pkg/kit}/tele/blend/listener.go (87%) rename {kit => pkg/kit}/tele/blend/msg.go (100%) rename {kit => pkg/kit}/tele/blend/session.go (98%) rename {kit => pkg/kit}/tele/blend/transport.go (87%) rename {kit => pkg/kit}/tele/codec/_codec_test.go (86%) rename {kit => pkg/kit}/tele/codec/codec.go (100%) rename {kit => pkg/kit}/tele/codec/conn.go (100%) rename {kit => pkg/kit}/tele/codec/gob.go (100%) rename {kit => pkg/kit}/tele/codec/gob_test.go (100%) rename {kit => pkg/kit}/tele/codec/transport.go (100%) rename {kit => pkg/kit}/tele/doc.go (100%) rename {kit => pkg/kit}/tele/hmac/addr.go (100%) rename {kit => pkg/kit}/tele/hmac/codec.go (98%) rename {kit => pkg/kit}/tele/limiter/l.go (100%) rename {kit => pkg/kit}/tele/limiter/l_test.go (100%) rename {kit => pkg/kit}/tele/tcp/addr.go (100%) rename {kit => pkg/kit}/tele/tcp/codec.go (95%) rename {kit => pkg/kit}/tele/tele.go (75%) rename {kit => pkg/kit}/tele/trace/fmt.go (100%) rename {kit => pkg/kit}/tele/trace/frame.go (100%) rename {kit => pkg/kit}/tele/trace/ticket.go (100%) rename {kit => pkg/kit}/term/MAINTAINERS (100%) rename {kit => pkg/kit}/term/ORIGIN (100%) rename {kit => pkg/kit}/term/term.go (100%) rename {kit => pkg/kit}/term/termios_darwin.go (100%) rename {kit => pkg/kit}/term/termios_linux.go (100%) rename {kit => pkg/kit}/x/doc.go (100%) rename {kit => pkg/kit}/x/exec/exec.go (95%) rename {kit => pkg/kit}/x/file/file.go (98%) rename {kit => pkg/kit}/x/file/fileinfo.go (100%) rename {kit => pkg/kit}/x/io/io.go (98%) rename {kit => pkg/kit}/xor/util.go (100%) rename {kit => pkg/kit}/xor/xor.go (100%) rename {kit => pkg/kit}/xor/xor_test.go (100%) rename {sys => pkg/sys}/acid/acid.go (94%) rename {sys => pkg/sys}/acid/behalf.go (95%) rename {sys => pkg/sys}/lang/README (100%) rename {sys => pkg/sys}/lang/TODO (100%) rename {sys => pkg/sys}/lang/_ptrptr_test.go (100%) rename {sys => pkg/sys}/lang/_runtime_test.go (97%) rename {sys => pkg/sys}/lang/call.go (96%) rename {sys => pkg/sys}/lang/dial.go (95%) rename {sys => pkg/sys}/lang/doc.go (89%) rename {sys => pkg/sys}/lang/error.go (100%) rename {sys => pkg/sys}/lang/exp.go (96%) rename {sys => pkg/sys}/lang/flat.go (100%) rename {sys => pkg/sys}/lang/freeze.go (100%) rename {sys => pkg/sys}/lang/freeze_test.go (92%) rename {sys => pkg/sys}/lang/func.go (94%) rename {sys => pkg/sys}/lang/imp.go (96%) rename {sys => pkg/sys}/lang/lang.go (94%) rename {sys => pkg/sys}/lang/msg.go (96%) rename {sys => pkg/sys}/lang/perm.go (100%) rename {sys => pkg/sys}/lang/prof/profile.go (98%) rename {sys => pkg/sys}/lang/prof/stat.go (100%) rename {sys => pkg/sys}/lang/prof/stopwatch.go (100%) rename {sys => pkg/sys}/lang/ptrptr.go (94%) rename {sys => pkg/sys}/lang/readwriter.go (97%) rename {sys => pkg/sys}/lang/runtime.go (91%) rename {sys => pkg/sys}/lang/sandbox.go (98%) rename {sys => pkg/sys}/lang/srv.go (100%) rename {sys => pkg/sys}/lang/types/gob.go (100%) rename {sys => pkg/sys}/lang/types/register.go (100%) rename {sys => pkg/sys}/lang/types/type.go (100%) rename {sys => pkg/sys}/lang/types/util.go (100%) rename {sys => pkg/sys}/lang/value.go (98%) rename {sys => pkg/sys}/lang/vexp.go (98%) rename {sys => pkg/sys}/lang/vimp.go (98%) rename {sys => pkg/sys}/lang/vrewrite.go (100%) rename {sys => pkg/sys}/lang/vrewrite_test.go (100%) rename {sys => pkg/sys}/sys.go (100%) rename {sys => pkg/sys}/tele/_tele_test.go (97%) rename {sys => pkg/sys}/tele/addr.go (96%) rename {sys => pkg/sys}/tele/conn.go (90%) rename {sys => pkg/sys}/tele/dialer.go (94%) rename {sys => pkg/sys}/tele/listener.go (96%) rename {sys => pkg/sys}/tele/transport.go (90%) rename {tissue => pkg/tissue}/doc.go (100%) rename {tissue => pkg/tissue}/exo.go (100%) rename {tissue => pkg/tissue}/folk.go (95%) rename {tissue => pkg/tissue}/kin.go (97%) rename {tissue => pkg/tissue}/locus/locus.go (92%) rename {tissue => pkg/tissue}/locus/peer.go (84%) rename {tissue => pkg/tissue}/locus/x.go (94%) rename {tissue => pkg/tissue}/neighborhood.go (97%) rename {tissue => pkg/tissue}/tube/doc.go (100%) rename {tissue => pkg/tissue}/tube/record.go (100%) rename {tissue => pkg/tissue}/tube/tube.go (96%) rename {tissue => pkg/tissue}/tube/view.go (98%) rename {tissue => pkg/tissue}/tube/x.go (95%) rename {tissue => pkg/tissue}/util.go (96%) rename {use => pkg/use}/anchorfs/anchorfs.go (96%) rename {use => pkg/use}/anchorfs/module.go (95%) rename {use => pkg/use}/circuit/lang.go (97%) rename {use => pkg/use}/circuit/module.go (96%) rename {use => pkg/use}/circuit/runtime.go (91%) rename {use => pkg/use}/errors/errors.go (100%) rename {use => pkg/use}/n/id.go (97%) rename {use => pkg/use}/n/module.go (94%) rename {use => pkg/use}/n/transport.go (100%) rename {use => pkg/use}/use.go (100%) rename {use => pkg/use}/worker/worker.go (94%) diff --git a/cmd/circuit/chan.go b/cmd/circuit/chan.go index 7651043..4526b06 100644 --- a/cmd/circuit/chan.go +++ b/cmd/circuit/chan.go @@ -13,7 +13,7 @@ import ( "os" "strconv" - "github.com/hoijui/circuit/client" + "github.com/hoijui/circuit/pkg/client" "github.com/pkg/errors" "github.com/urfave/cli/v2" diff --git a/cmd/circuit/dns.go b/cmd/circuit/dns.go index 158ceb4..75f5de9 100644 --- a/cmd/circuit/dns.go +++ b/cmd/circuit/dns.go @@ -8,7 +8,7 @@ package main import ( - "github.com/hoijui/circuit/client" + "github.com/hoijui/circuit/pkg/client" "github.com/pkg/errors" "github.com/urfave/cli/v2" diff --git a/cmd/circuit/load.go b/cmd/circuit/load.go index ac4c9e1..6b0ccfc 100644 --- a/cmd/circuit/load.go +++ b/cmd/circuit/load.go @@ -19,12 +19,12 @@ import ( "strings" "time" - _ "github.com/hoijui/circuit/kit/debug/kill" - "github.com/hoijui/circuit/kit/lockfile" - "github.com/hoijui/circuit/sys/lang" - _ "github.com/hoijui/circuit/sys/tele" - "github.com/hoijui/circuit/use/circuit" - "github.com/hoijui/circuit/use/n" + _ "github.com/hoijui/circuit/pkg/kit/debug/kill" + "github.com/hoijui/circuit/pkg/kit/lockfile" + "github.com/hoijui/circuit/pkg/sys/lang" + _ "github.com/hoijui/circuit/pkg/sys/tele" + "github.com/hoijui/circuit/pkg/use/circuit" + "github.com/hoijui/circuit/pkg/use/n" ) func load(addr *net.TCPAddr, vardir string, key []byte) n.Addr { diff --git a/cmd/circuit/load_windows.go b/cmd/circuit/load_windows.go index d2ee782..7aa2b82 100644 --- a/cmd/circuit/load_windows.go +++ b/cmd/circuit/load_windows.go @@ -18,11 +18,11 @@ import ( "strings" "time" - _ "github.com/hoijui/circuit/kit/debug/kill" - "github.com/hoijui/circuit/sys/lang" - _ "github.com/hoijui/circuit/sys/tele" - "github.com/hoijui/circuit/use/circuit" - "github.com/hoijui/circuit/use/n" + _ "github.com/hoijui/circuit/pkg/kit/debug/kill" + "github.com/hoijui/circuit/pkg/sys/lang" + _ "github.com/hoijui/circuit/pkg/sys/tele" + "github.com/hoijui/circuit/pkg/use/circuit" + "github.com/hoijui/circuit/pkg/use/n" ) func load(addr *net.TCPAddr, vardir string, key []byte) n.Addr { diff --git a/cmd/circuit/ls.go b/cmd/circuit/ls.go index 07e7af1..775b267 100644 --- a/cmd/circuit/ls.go +++ b/cmd/circuit/ls.go @@ -13,8 +13,8 @@ import ( "sort" "strings" - "github.com/hoijui/circuit/client" - "github.com/hoijui/circuit/client/docker" + "github.com/hoijui/circuit/pkg/client" + "github.com/hoijui/circuit/pkg/client/docker" "github.com/pkg/errors" "github.com/urfave/cli/v2" ) diff --git a/cmd/circuit/peek.go b/cmd/circuit/peek.go index 961daa5..919e8b3 100644 --- a/cmd/circuit/peek.go +++ b/cmd/circuit/peek.go @@ -11,8 +11,8 @@ import ( "encoding/json" "fmt" - "github.com/hoijui/circuit/client" - "github.com/hoijui/circuit/client/docker" + "github.com/hoijui/circuit/pkg/client" + "github.com/hoijui/circuit/pkg/client/docker" "github.com/pkg/errors" "github.com/urfave/cli/v2" diff --git a/cmd/circuit/procdkr.go b/cmd/circuit/procdkr.go index c29ffdb..ab3a2e4 100644 --- a/cmd/circuit/procdkr.go +++ b/cmd/circuit/procdkr.go @@ -13,8 +13,8 @@ import ( "io/ioutil" "os" - "github.com/hoijui/circuit/client" - "github.com/hoijui/circuit/client/docker" + "github.com/hoijui/circuit/pkg/client" + "github.com/hoijui/circuit/pkg/client/docker" "github.com/pkg/errors" "github.com/urfave/cli/v2" diff --git a/cmd/circuit/recv.go b/cmd/circuit/recv.go index 2dbb73b..b18f0d1 100644 --- a/cmd/circuit/recv.go +++ b/cmd/circuit/recv.go @@ -12,7 +12,7 @@ import ( "io" "os" - "github.com/hoijui/circuit/client" + "github.com/hoijui/circuit/pkg/client" "github.com/pkg/errors" "github.com/urfave/cli/v2" diff --git a/cmd/circuit/server.go b/cmd/circuit/server.go index 58b60eb..cd4e658 100644 --- a/cmd/circuit/server.go +++ b/cmd/circuit/server.go @@ -8,13 +8,13 @@ package main import ( - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/use/n" "github.com/pkg/errors" // "bytes" "io" "os" - "github.com/hoijui/circuit/client" + "github.com/hoijui/circuit/pkg/client" "github.com/urfave/cli/v2" ) diff --git a/cmd/circuit/start.go b/cmd/circuit/start.go index 691ce4c..1eb4057 100644 --- a/cmd/circuit/start.go +++ b/cmd/circuit/start.go @@ -15,12 +15,12 @@ import ( "os" "path" - "github.com/hoijui/circuit/element/docker" - "github.com/hoijui/circuit/kit/assemble" - "github.com/hoijui/circuit/tissue" - "github.com/hoijui/circuit/tissue/locus" - "github.com/hoijui/circuit/use/circuit" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/element/docker" + "github.com/hoijui/circuit/pkg/kit/assemble" + "github.com/hoijui/circuit/pkg/tissue" + "github.com/hoijui/circuit/pkg/tissue/locus" + "github.com/hoijui/circuit/pkg/use/circuit" + "github.com/hoijui/circuit/pkg/use/n" "github.com/pkg/errors" "github.com/urfave/cli/v2" diff --git a/cmd/circuit/util.go b/cmd/circuit/util.go index 3b21070..2e99803 100644 --- a/cmd/circuit/util.go +++ b/cmd/circuit/util.go @@ -14,7 +14,7 @@ import ( "os" "strings" - "github.com/hoijui/circuit/client" + "github.com/hoijui/circuit/pkg/client" "github.com/urfave/cli/v2" ) diff --git a/cmd/circuit/wait.go b/cmd/circuit/wait.go index c089d9d..d446f0b 100644 --- a/cmd/circuit/wait.go +++ b/cmd/circuit/wait.go @@ -12,8 +12,8 @@ import ( "log" "os" - "github.com/hoijui/circuit/client" - "github.com/hoijui/circuit/client/docker" + "github.com/hoijui/circuit/pkg/client" + "github.com/hoijui/circuit/pkg/client/docker" "github.com/pkg/errors" "github.com/urfave/cli/v2" ) diff --git a/gocircuit.org/api/api.go b/gocircuit.org/api/api.go index ef0e943..43299b2 100644 --- a/gocircuit.org/api/api.go +++ b/gocircuit.org/api/api.go @@ -22,7 +22,7 @@ const mainBody = `

To use the Go client API to the circuit, start by importing the client package:

-	import "github.com/hoijui/circuit/client"
+	import "github.com/hoijui/circuit/pkg/client"
 

System abstraction

diff --git a/gocircuit.org/api/connect.go b/gocircuit.org/api/connect.go index 307e466..440236a 100644 --- a/gocircuit.org/api/connect.go +++ b/gocircuit.org/api/connect.go @@ -18,7 +18,7 @@ const connectBody = `

To use the Go client API to the circuit, start by importing the client package:

-	import "github.com/hoijui/circuit/client"
+	import "github.com/hoijui/circuit/pkg/client"
 

The first step of every circuit client application is connecting to a circuit cluster. diff --git a/gocircuit.org/api/container.go b/gocircuit.org/api/container.go index 121f4d4..f586c8a 100644 --- a/gocircuit.org/api/container.go +++ b/gocircuit.org/api/container.go @@ -18,7 +18,7 @@ const containerBody = `

The container-related types and structures of the circuit API are in a dedicated package:

-	import "github.com/hoijui/circuit/client/docker"
+	import "github.com/hoijui/circuit/pkg/client/docker"
 

Container element manipulations and semantics are exactly analogous to diff --git a/gocircuit.org/build/index.go b/gocircuit.org/build/index.go index b07d4ce..75de178 100644 --- a/gocircuit.org/build/index.go +++ b/gocircuit.org/build/index.go @@ -33,7 +33,7 @@ can fail if the hardware hosting the system's own software fails.

Sources

  - +

Find the source repository for Circuit on GitHub. Follow us on Twitter @gocircuit. diff --git a/gocircuit.org/man/cmd.go b/gocircuit.org/man/cmd.go index 0e6a5e6..56e73ea 100644 --- a/gocircuit.org/man/cmd.go +++ b/gocircuit.org/man/cmd.go @@ -18,7 +18,7 @@ const commandBody = `

Once the circuit servers are started, you can create, observe and control circuit elements (i) interactively—using the circuit binary which doubles as a command-line client—as -well as (ii) programmatically—using the circuit Go client package github.com/hoijui/circuit/client. +well as (ii) programmatically—using the circuit Go client package github.com/hoijui/circuit/pkg/client. In fact, the circuit command-line tool is simply a front-end for the Go client library.

Clients (the tool or your own) dial into a circuit server in order to diff --git a/gocircuit.org/man/element-process.go b/gocircuit.org/man/element-process.go index fe8aab3..1829246 100644 --- a/gocircuit.org/man/element-process.go +++ b/gocircuit.org/man/element-process.go @@ -16,7 +16,7 @@ func RenderElementProcessPage() string { //

To create and manipulate process elements, one needs to import the circuit's Go client API: //

-// 	import "github.com/hoijui/circuit/client"
+// 	import "github.com/hoijui/circuit/pkg/client"
 // 
//

Let client, of type *client.Client, be an already established diff --git a/gocircuit.org/tutorial/mysql-nodejs/app.go b/gocircuit.org/tutorial/mysql-nodejs/app.go index 5d4f4bb..f2dabc3 100644 --- a/gocircuit.org/tutorial/mysql-nodejs/app.go +++ b/gocircuit.org/tutorial/mysql-nodejs/app.go @@ -32,7 +32,7 @@ package main import ( "flag" - "github.com/hoijui/circuit/client" + "github.com/hoijui/circuit/pkg/client" ) var flagAddr = flag.String("addr", "", "circuit server address (looks like circuit://...)") @@ -48,7 +48,7 @@ func main() { } -

Notable here is the import of the circuit client package "github.com/hoijui/circuit/client" +

Notable here is the import of the circuit client package "github.com/hoijui/circuit/pkg/client" and the definition of function fatalf(), which we'll use to report terminal errors. diff --git a/anchor/anchor.go b/pkg/anchor/anchor.go similarity index 100% rename from anchor/anchor.go rename to pkg/anchor/anchor.go diff --git a/anchor/term.go b/pkg/anchor/term.go similarity index 92% rename from anchor/term.go rename to pkg/anchor/term.go index cec48cc..961bbc1 100644 --- a/anchor/term.go +++ b/pkg/anchor/term.go @@ -12,14 +12,14 @@ import ( "io" "log" - ds "github.com/hoijui/circuit/client/docker" - "github.com/hoijui/circuit/element/dns" - "github.com/hoijui/circuit/element/docker" - "github.com/hoijui/circuit/element/proc" - srv "github.com/hoijui/circuit/element/server" - "github.com/hoijui/circuit/element/valve" - "github.com/hoijui/circuit/kit/pubsub" - "github.com/hoijui/circuit/use/circuit" + ds "github.com/hoijui/circuit/pkg/client/docker" + "github.com/hoijui/circuit/pkg/element/dns" + "github.com/hoijui/circuit/pkg/element/docker" + "github.com/hoijui/circuit/pkg/element/proc" + srv "github.com/hoijui/circuit/pkg/element/server" + "github.com/hoijui/circuit/pkg/element/valve" + "github.com/hoijui/circuit/pkg/kit/pubsub" + "github.com/hoijui/circuit/pkg/use/circuit" ) type Element interface { diff --git a/anchor/x.go b/pkg/anchor/x.go similarity index 88% rename from anchor/x.go rename to pkg/anchor/x.go index 16c625b..1444967 100644 --- a/anchor/x.go +++ b/pkg/anchor/x.go @@ -10,14 +10,14 @@ package anchor import ( "errors" - srv "github.com/hoijui/circuit/element/server" - "github.com/hoijui/circuit/element/proc" - "github.com/hoijui/circuit/element/docker" - "github.com/hoijui/circuit/element/valve" - "github.com/hoijui/circuit/element/dns" - "github.com/hoijui/circuit/kit/pubsub" - "github.com/hoijui/circuit/use/circuit" - xerrors "github.com/hoijui/circuit/use/errors" + srv "github.com/hoijui/circuit/pkg/element/server" + "github.com/hoijui/circuit/pkg/element/proc" + "github.com/hoijui/circuit/pkg/element/docker" + "github.com/hoijui/circuit/pkg/element/valve" + "github.com/hoijui/circuit/pkg/element/dns" + "github.com/hoijui/circuit/pkg/kit/pubsub" + "github.com/hoijui/circuit/pkg/use/circuit" + xerrors "github.com/hoijui/circuit/pkg/use/errors" ) func init() { diff --git a/client/chan.go b/pkg/client/chan.go similarity index 98% rename from client/chan.go rename to pkg/client/chan.go index be3e0da..6e644e8 100644 --- a/client/chan.go +++ b/pkg/client/chan.go @@ -10,7 +10,7 @@ package client import ( "io" - "github.com/hoijui/circuit/element/valve" + "github.com/hoijui/circuit/pkg/element/valve" ) // Chan provides access to a circuit channel element. diff --git a/client/client.go b/pkg/client/client.go similarity index 91% rename from client/client.go rename to pkg/client/client.go index c5615dc..4e96672 100644 --- a/client/client.go +++ b/pkg/client/client.go @@ -17,16 +17,16 @@ import ( "sync" "time" - "github.com/hoijui/circuit/anchor" - "github.com/hoijui/circuit/client/docker" - "github.com/hoijui/circuit/kit/assemble" - _ "github.com/hoijui/circuit/kit/debug/kill" - "github.com/hoijui/circuit/sys/lang" - _ "github.com/hoijui/circuit/sys/tele" - "github.com/hoijui/circuit/tissue" - "github.com/hoijui/circuit/tissue/locus" - "github.com/hoijui/circuit/use/circuit" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/anchor" + "github.com/hoijui/circuit/pkg/client/docker" + "github.com/hoijui/circuit/pkg/kit/assemble" + _ "github.com/hoijui/circuit/pkg/kit/debug/kill" + "github.com/hoijui/circuit/pkg/sys/lang" + _ "github.com/hoijui/circuit/pkg/sys/tele" + "github.com/hoijui/circuit/pkg/tissue" + "github.com/hoijui/circuit/pkg/tissue/locus" + "github.com/hoijui/circuit/pkg/use/circuit" + "github.com/hoijui/circuit/pkg/use/n" ) var _once sync.Once diff --git a/client/dns.go b/pkg/client/dns.go similarity index 95% rename from client/dns.go rename to pkg/client/dns.go index 2715b6a..258d8bf 100644 --- a/client/dns.go +++ b/pkg/client/dns.go @@ -8,7 +8,7 @@ package client import ( - "github.com/hoijui/circuit/element/dns" + "github.com/hoijui/circuit/pkg/element/dns" ) // NameserverStat encloses process state information. diff --git a/client/docker/docker.go b/pkg/client/docker/docker.go similarity index 100% rename from client/docker/docker.go rename to pkg/client/docker/docker.go diff --git a/client/docker/run.go b/pkg/client/docker/run.go similarity index 100% rename from client/docker/run.go rename to pkg/client/docker/run.go diff --git a/client/docker/stat.go b/pkg/client/docker/stat.go similarity index 100% rename from client/docker/stat.go rename to pkg/client/docker/stat.go diff --git a/client/proc.go b/pkg/client/proc.go similarity index 98% rename from client/proc.go rename to pkg/client/proc.go index eba3402..0d976c3 100644 --- a/client/proc.go +++ b/pkg/client/proc.go @@ -10,7 +10,7 @@ package client import ( "io" - "github.com/hoijui/circuit/element/proc" + "github.com/hoijui/circuit/pkg/element/proc" ) // Cmd describes the execution parameters for an OS process. diff --git a/client/server.go b/pkg/client/server.go similarity index 93% rename from client/server.go rename to pkg/client/server.go index 3f1602c..dea9a0f 100644 --- a/client/server.go +++ b/pkg/client/server.go @@ -11,7 +11,7 @@ import ( "io" "time" - srv "github.com/hoijui/circuit/element/server" + srv "github.com/hoijui/circuit/pkg/element/server" ) // ServerStat encloses subscription state information. diff --git a/client/subscription.go b/pkg/client/subscription.go similarity index 96% rename from client/subscription.go rename to pkg/client/subscription.go index 0b25dc9..2603cd5 100644 --- a/client/subscription.go +++ b/pkg/client/subscription.go @@ -8,7 +8,7 @@ package client import ( - "github.com/hoijui/circuit/kit/pubsub" + "github.com/hoijui/circuit/pkg/kit/pubsub" ) // SubscriptionStat encloses subscription state information. diff --git a/client/term.go b/pkg/client/term.go similarity index 92% rename from client/term.go rename to pkg/client/term.go index a8adf56..fd9df01 100644 --- a/client/term.go +++ b/pkg/client/term.go @@ -10,16 +10,16 @@ package client import ( // "fmt" - "github.com/hoijui/circuit/anchor" - "github.com/hoijui/circuit/element/dns" - "github.com/hoijui/circuit/element/proc" - srv "github.com/hoijui/circuit/element/server" - "github.com/hoijui/circuit/element/valve" - "github.com/hoijui/circuit/kit/pubsub" - "github.com/hoijui/circuit/tissue" - - cdocker "github.com/hoijui/circuit/client/docker" - edocker "github.com/hoijui/circuit/element/docker" + "github.com/hoijui/circuit/pkg/anchor" + "github.com/hoijui/circuit/pkg/element/dns" + "github.com/hoijui/circuit/pkg/element/proc" + srv "github.com/hoijui/circuit/pkg/element/server" + "github.com/hoijui/circuit/pkg/element/valve" + "github.com/hoijui/circuit/pkg/kit/pubsub" + "github.com/hoijui/circuit/pkg/tissue" + + cdocker "github.com/hoijui/circuit/pkg/client/docker" + edocker "github.com/hoijui/circuit/pkg/element/docker" ) // An Anchor represents a location in the global anchor namespace of a circuit diff --git a/element/_mesos/mesos.go b/pkg/element/_mesos/mesos.go similarity index 92% rename from element/_mesos/mesos.go rename to pkg/element/_mesos/mesos.go index fd4d304..9259b4f 100644 --- a/element/_mesos/mesos.go +++ b/pkg/element/_mesos/mesos.go @@ -13,7 +13,7 @@ import ( "io" "sync" - "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/pkg/use/circuit" ) type Resource map[string]int // resource name => number of units diff --git a/element/dns/_m.go b/pkg/element/dns/_m.go similarity index 100% rename from element/dns/_m.go rename to pkg/element/dns/_m.go diff --git a/element/dns/dns.go b/pkg/element/dns/dns.go similarity index 98% rename from element/dns/dns.go rename to pkg/element/dns/dns.go index 60354f2..23324f9 100644 --- a/element/dns/dns.go +++ b/pkg/element/dns/dns.go @@ -12,7 +12,7 @@ import ( "sync" "github.com/hoijui/circuit/github.com/miekg/dns" - "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/pkg/use/circuit" ) type Nameserver interface { diff --git a/element/dns/probe.sh b/pkg/element/dns/probe.sh similarity index 100% rename from element/dns/probe.sh rename to pkg/element/dns/probe.sh diff --git a/element/dns/stat.go b/pkg/element/dns/stat.go similarity index 100% rename from element/dns/stat.go rename to pkg/element/dns/stat.go diff --git a/element/dns/x.go b/pkg/element/dns/x.go similarity index 89% rename from element/dns/x.go rename to pkg/element/dns/x.go index dbacb40..d4f2376 100644 --- a/element/dns/x.go +++ b/pkg/element/dns/x.go @@ -8,8 +8,8 @@ package dns import ( - "github.com/hoijui/circuit/use/circuit" - "github.com/hoijui/circuit/use/errors" + "github.com/hoijui/circuit/pkg/use/circuit" + "github.com/hoijui/circuit/pkg/use/errors" ) func init() { diff --git a/element/docker/_docker_test.go b/pkg/element/docker/_docker_test.go similarity index 92% rename from element/docker/_docker_test.go rename to pkg/element/docker/_docker_test.go index 818d56d..56592a3 100644 --- a/element/docker/_docker_test.go +++ b/pkg/element/docker/_docker_test.go @@ -11,7 +11,7 @@ import ( "fmt" "testing" - ds "github.com/hoijui/circuit/client/docker" + ds "github.com/hoijui/circuit/pkg/client/docker" ) func TestDocker(t *testing.T) { diff --git a/element/docker/docker.go b/pkg/element/docker/docker.go similarity index 91% rename from element/docker/docker.go rename to pkg/element/docker/docker.go index 573cedf..4870e76 100644 --- a/element/docker/docker.go +++ b/pkg/element/docker/docker.go @@ -13,11 +13,11 @@ import ( "os/exec" "runtime" - "github.com/hoijui/circuit/element/proc" - "github.com/hoijui/circuit/kit/interruptible" - "github.com/hoijui/circuit/kit/lang" - "github.com/hoijui/circuit/use/circuit" - ds "github.com/hoijui/circuit/client/docker" + "github.com/hoijui/circuit/pkg/element/proc" + "github.com/hoijui/circuit/pkg/kit/interruptible" + "github.com/hoijui/circuit/pkg/kit/lang" + "github.com/hoijui/circuit/pkg/use/circuit" + ds "github.com/hoijui/circuit/pkg/client/docker" ) type Container interface { diff --git a/element/docker/util.go b/pkg/element/docker/util.go similarity index 100% rename from element/docker/util.go rename to pkg/element/docker/util.go diff --git a/element/docker/x.go b/pkg/element/docker/x.go similarity index 90% rename from element/docker/x.go rename to pkg/element/docker/x.go index 075cdbe..08f0fdc 100644 --- a/element/docker/x.go +++ b/pkg/element/docker/x.go @@ -10,10 +10,10 @@ package docker import ( "io" - xio "github.com/hoijui/circuit/kit/x/io" - "github.com/hoijui/circuit/use/circuit" - "github.com/hoijui/circuit/use/errors" - ds "github.com/hoijui/circuit/client/docker" + xio "github.com/hoijui/circuit/pkg/kit/x/io" + "github.com/hoijui/circuit/pkg/use/circuit" + "github.com/hoijui/circuit/pkg/use/errors" + ds "github.com/hoijui/circuit/pkg/client/docker" ) func init() { diff --git a/element/proc/cmd.go b/pkg/element/proc/cmd.go similarity index 100% rename from element/proc/cmd.go rename to pkg/element/proc/cmd.go diff --git a/element/proc/proc.go b/pkg/element/proc/proc.go similarity index 97% rename from element/proc/proc.go rename to pkg/element/proc/proc.go index fc41a30..6409ec5 100644 --- a/element/proc/proc.go +++ b/pkg/element/proc/proc.go @@ -17,8 +17,8 @@ import ( "sync" "syscall" - "github.com/hoijui/circuit/kit/interruptible" - "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/pkg/kit/interruptible" + "github.com/hoijui/circuit/pkg/use/circuit" ) type Proc interface { diff --git a/element/proc/stat.go b/pkg/element/proc/stat.go similarity index 100% rename from element/proc/stat.go rename to pkg/element/proc/stat.go diff --git a/element/proc/stat_sigmap.go b/pkg/element/proc/stat_sigmap.go similarity index 100% rename from element/proc/stat_sigmap.go rename to pkg/element/proc/stat_sigmap.go diff --git a/element/proc/stat_sigmap_windows.go b/pkg/element/proc/stat_sigmap_windows.go similarity index 100% rename from element/proc/stat_sigmap_windows.go rename to pkg/element/proc/stat_sigmap_windows.go diff --git a/element/proc/x.go b/pkg/element/proc/x.go similarity index 93% rename from element/proc/x.go rename to pkg/element/proc/x.go index 0cc9097..ecf7d0b 100644 --- a/element/proc/x.go +++ b/pkg/element/proc/x.go @@ -10,9 +10,9 @@ package proc import ( "io" - xio "github.com/hoijui/circuit/kit/x/io" - "github.com/hoijui/circuit/use/circuit" - "github.com/hoijui/circuit/use/errors" + xio "github.com/hoijui/circuit/pkg/kit/x/io" + "github.com/hoijui/circuit/pkg/use/circuit" + "github.com/hoijui/circuit/pkg/use/errors" ) func init() { diff --git a/element/server/srv.go b/pkg/element/server/srv.go similarity index 89% rename from element/server/srv.go rename to pkg/element/server/srv.go index 651a75a..3045ef2 100644 --- a/element/server/srv.go +++ b/pkg/element/server/srv.go @@ -14,10 +14,10 @@ import ( "runtime/pprof" "time" - "github.com/hoijui/circuit/kit/interruptible" - "github.com/hoijui/circuit/tissue" - "github.com/hoijui/circuit/use/circuit" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/kit/interruptible" + "github.com/hoijui/circuit/pkg/tissue" + "github.com/hoijui/circuit/pkg/use/circuit" + "github.com/hoijui/circuit/pkg/use/n" ) type Server interface { diff --git a/element/server/x.go b/pkg/element/server/x.go similarity index 90% rename from element/server/x.go rename to pkg/element/server/x.go index ce0a3f1..7850464 100644 --- a/element/server/x.go +++ b/pkg/element/server/x.go @@ -11,9 +11,9 @@ import ( // "fmt" "io" - xio "github.com/hoijui/circuit/kit/x/io" - "github.com/hoijui/circuit/use/circuit" - "github.com/hoijui/circuit/use/errors" + xio "github.com/hoijui/circuit/pkg/kit/x/io" + "github.com/hoijui/circuit/pkg/use/circuit" + "github.com/hoijui/circuit/pkg/use/errors" ) func init() { diff --git a/element/valve/ops.go b/pkg/element/valve/ops.go similarity index 97% rename from element/valve/ops.go rename to pkg/element/valve/ops.go index d0a5e17..e7060f8 100644 --- a/element/valve/ops.go +++ b/pkg/element/valve/ops.go @@ -11,7 +11,7 @@ import ( "errors" "io" - "github.com/hoijui/circuit/kit/interruptible" + "github.com/hoijui/circuit/pkg/kit/interruptible" ) // Send … diff --git a/element/valve/valve.go b/pkg/element/valve/valve.go similarity index 97% rename from element/valve/valve.go rename to pkg/element/valve/valve.go index faeba39..994a46d 100644 --- a/element/valve/valve.go +++ b/pkg/element/valve/valve.go @@ -12,7 +12,7 @@ import ( "io" "sync" - "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/pkg/use/circuit" ) type Valve interface { diff --git a/element/valve/x.go b/pkg/element/valve/x.go similarity index 92% rename from element/valve/x.go rename to pkg/element/valve/x.go index 550f5e8..3a49ccc 100644 --- a/element/valve/x.go +++ b/pkg/element/valve/x.go @@ -10,9 +10,9 @@ package valve import ( "io" - xio "github.com/hoijui/circuit/kit/x/io" - "github.com/hoijui/circuit/use/circuit" - "github.com/hoijui/circuit/use/errors" + xio "github.com/hoijui/circuit/pkg/kit/x/io" + "github.com/hoijui/circuit/pkg/use/circuit" + "github.com/hoijui/circuit/pkg/use/errors" ) func init() { diff --git a/kit/assemble/assemble.go b/pkg/kit/assemble/assemble.go similarity index 93% rename from kit/assemble/assemble.go rename to pkg/kit/assemble/assemble.go index a6767ec..363df98 100644 --- a/kit/assemble/assemble.go +++ b/pkg/kit/assemble/assemble.go @@ -11,9 +11,9 @@ import ( "log" "net" - "github.com/hoijui/circuit/kit/xor" - "github.com/hoijui/circuit/use/circuit" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/kit/xor" + "github.com/hoijui/circuit/pkg/use/circuit" + "github.com/hoijui/circuit/pkg/use/n" ) type Assembler struct { diff --git a/kit/assemble/dialback.go b/pkg/kit/assemble/dialback.go similarity index 90% rename from kit/assemble/dialback.go rename to pkg/kit/assemble/dialback.go index c7dbc61..cb81251 100644 --- a/kit/assemble/dialback.go +++ b/pkg/kit/assemble/dialback.go @@ -10,8 +10,8 @@ package assemble import ( "sync" - "github.com/hoijui/circuit/use/circuit" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/use/circuit" + "github.com/hoijui/circuit/pkg/use/n" ) type DialBack struct { diff --git a/kit/assemble/discover_test.go b/pkg/kit/assemble/discover_test.go similarity index 94% rename from kit/assemble/discover_test.go rename to pkg/kit/assemble/discover_test.go index c7f71b8..c3b9012 100644 --- a/kit/assemble/discover_test.go +++ b/pkg/kit/assemble/discover_test.go @@ -12,7 +12,7 @@ import ( "net" "testing" - "github.com/hoijui/circuit/kit/xor" + "github.com/hoijui/circuit/pkg/kit/xor" ) // func TestAssembler(t *testing.T) { diff --git a/kit/assemble/gather.go b/pkg/kit/assemble/gather.go similarity index 97% rename from kit/assemble/gather.go rename to pkg/kit/assemble/gather.go index 895f1c5..8dc762e 100644 --- a/kit/assemble/gather.go +++ b/pkg/kit/assemble/gather.go @@ -14,7 +14,7 @@ import ( "os" "runtime" - "github.com/hoijui/circuit/kit/xor" + "github.com/hoijui/circuit/pkg/kit/xor" ) type Gather struct { diff --git a/kit/assemble/lens.go b/pkg/kit/assemble/lens.go similarity index 96% rename from kit/assemble/lens.go rename to pkg/kit/assemble/lens.go index 5bdc1c1..5019c65 100644 --- a/kit/assemble/lens.go +++ b/pkg/kit/assemble/lens.go @@ -12,7 +12,7 @@ import ( "fmt" "sync" - "github.com/hoijui/circuit/kit/xor" + "github.com/hoijui/circuit/pkg/kit/xor" ) type Lens struct { diff --git a/kit/assemble/scatter.go b/pkg/kit/assemble/scatter.go similarity index 96% rename from kit/assemble/scatter.go rename to pkg/kit/assemble/scatter.go index 6d68820..03ea63f 100644 --- a/kit/assemble/scatter.go +++ b/pkg/kit/assemble/scatter.go @@ -13,7 +13,7 @@ import ( "net" "time" - "github.com/hoijui/circuit/kit/xor" + "github.com/hoijui/circuit/pkg/kit/xor" ) type Scatter struct { diff --git a/kit/assemble/trace.go b/pkg/kit/assemble/trace.go similarity index 100% rename from kit/assemble/trace.go rename to pkg/kit/assemble/trace.go diff --git a/kit/config/config.go b/pkg/kit/config/config.go similarity index 100% rename from kit/config/config.go rename to pkg/kit/config/config.go diff --git a/kit/config/config_test.go b/pkg/kit/config/config_test.go similarity index 100% rename from kit/config/config_test.go rename to pkg/kit/config/config_test.go diff --git a/kit/debug/ctrlc/init.go b/pkg/kit/debug/ctrlc/init.go similarity index 87% rename from kit/debug/ctrlc/init.go rename to pkg/kit/debug/ctrlc/init.go index 5762a01..c7d9122 100644 --- a/kit/debug/ctrlc/init.go +++ b/pkg/kit/debug/ctrlc/init.go @@ -8,7 +8,7 @@ // Package ctrlc has the side effect of installing a Ctrl-C signal handler that throws a panic package ctrlc -import "github.com/hoijui/circuit/kit/debug" +import "github.com/hoijui/circuit/pkg/kit/debug" func init() { debug.InstallCtrlCPanic() diff --git a/kit/debug/http/http.go b/pkg/kit/debug/http/http.go similarity index 100% rename from kit/debug/http/http.go rename to pkg/kit/debug/http/http.go diff --git a/kit/debug/http/trace/trace.go b/pkg/kit/debug/http/trace/trace.go similarity index 100% rename from kit/debug/http/trace/trace.go rename to pkg/kit/debug/http/trace/trace.go diff --git a/kit/debug/kill/init.go b/pkg/kit/debug/kill/init.go similarity index 87% rename from kit/debug/kill/init.go rename to pkg/kit/debug/kill/init.go index 5319332..1a6ecc7 100644 --- a/kit/debug/kill/init.go +++ b/pkg/kit/debug/kill/init.go @@ -8,7 +8,7 @@ // Package kill has the side effect of installing a KILL signal handler that throws a panic package kill -import "github.com/hoijui/circuit/kit/debug" +import "github.com/hoijui/circuit/pkg/kit/debug" func init() { debug.InstallKillPanic() diff --git a/kit/debug/sigpanic.go b/pkg/kit/debug/sigpanic.go similarity index 100% rename from kit/debug/sigpanic.go rename to pkg/kit/debug/sigpanic.go diff --git a/kit/debug/sigpanic_save_panic_trace.go b/pkg/kit/debug/sigpanic_save_panic_trace.go similarity index 100% rename from kit/debug/sigpanic_save_panic_trace.go rename to pkg/kit/debug/sigpanic_save_panic_trace.go diff --git a/kit/debug/sigpanic_save_panic_trace_windows.go b/pkg/kit/debug/sigpanic_save_panic_trace_windows.go similarity index 100% rename from kit/debug/sigpanic_save_panic_trace_windows.go rename to pkg/kit/debug/sigpanic_save_panic_trace_windows.go diff --git a/kit/debug/syscall_wrapper.go b/pkg/kit/debug/syscall_wrapper.go similarity index 100% rename from kit/debug/syscall_wrapper.go rename to pkg/kit/debug/syscall_wrapper.go diff --git a/kit/debug/syscall_wrapper_arm.go b/pkg/kit/debug/syscall_wrapper_arm.go similarity index 100% rename from kit/debug/syscall_wrapper_arm.go rename to pkg/kit/debug/syscall_wrapper_arm.go diff --git a/kit/fmt/deep.go b/pkg/kit/fmt/deep.go similarity index 100% rename from kit/fmt/deep.go rename to pkg/kit/fmt/deep.go diff --git a/kit/fmt/deep_test.go b/pkg/kit/fmt/deep_test.go similarity index 100% rename from kit/fmt/deep_test.go rename to pkg/kit/fmt/deep_test.go diff --git a/kit/fmt/fmtbytes.go b/pkg/kit/fmt/fmtbytes.go similarity index 100% rename from kit/fmt/fmtbytes.go rename to pkg/kit/fmt/fmtbytes.go diff --git a/kit/interruptible/intr.go b/pkg/kit/interruptible/intr.go similarity index 100% rename from kit/interruptible/intr.go rename to pkg/kit/interruptible/intr.go diff --git a/kit/interruptible/mutex.go b/pkg/kit/interruptible/mutex.go similarity index 100% rename from kit/interruptible/mutex.go rename to pkg/kit/interruptible/mutex.go diff --git a/kit/interruptible/pipe.go b/pkg/kit/interruptible/pipe.go similarity index 100% rename from kit/interruptible/pipe.go rename to pkg/kit/interruptible/pipe.go diff --git a/kit/interruptible/pipe_test.go b/pkg/kit/interruptible/pipe_test.go similarity index 100% rename from kit/interruptible/pipe_test.go rename to pkg/kit/interruptible/pipe_test.go diff --git a/kit/interruptible/reader.go b/pkg/kit/interruptible/reader.go similarity index 100% rename from kit/interruptible/reader.go rename to pkg/kit/interruptible/reader.go diff --git a/kit/interruptible/writer.go b/pkg/kit/interruptible/writer.go similarity index 100% rename from kit/interruptible/writer.go rename to pkg/kit/interruptible/writer.go diff --git a/kit/iomisc/combine.go b/pkg/kit/iomisc/combine.go similarity index 100% rename from kit/iomisc/combine.go rename to pkg/kit/iomisc/combine.go diff --git a/kit/iomisc/dup.go b/pkg/kit/iomisc/dup.go similarity index 100% rename from kit/iomisc/dup.go rename to pkg/kit/iomisc/dup.go diff --git a/kit/iomisc/dup_test.go b/pkg/kit/iomisc/dup_test.go similarity index 100% rename from kit/iomisc/dup_test.go rename to pkg/kit/iomisc/dup_test.go diff --git a/kit/iomisc/eofcloser.go b/pkg/kit/iomisc/eofcloser.go similarity index 100% rename from kit/iomisc/eofcloser.go rename to pkg/kit/iomisc/eofcloser.go diff --git a/kit/iomisc/multi.go b/pkg/kit/iomisc/multi.go similarity index 100% rename from kit/iomisc/multi.go rename to pkg/kit/iomisc/multi.go diff --git a/kit/iomisc/prefix.go b/pkg/kit/iomisc/prefix.go similarity index 100% rename from kit/iomisc/prefix.go rename to pkg/kit/iomisc/prefix.go diff --git a/kit/iomisc/prefix_test.go b/pkg/kit/iomisc/prefix_test.go similarity index 100% rename from kit/iomisc/prefix_test.go rename to pkg/kit/iomisc/prefix_test.go diff --git a/kit/iomisc/sniffer.go b/pkg/kit/iomisc/sniffer.go similarity index 98% rename from kit/iomisc/sniffer.go rename to pkg/kit/iomisc/sniffer.go index 4b283b4..fa2bd9a 100644 --- a/kit/iomisc/sniffer.go +++ b/pkg/kit/iomisc/sniffer.go @@ -15,7 +15,7 @@ import ( "runtime" "sync" - "github.com/hoijui/circuit/use/errors" + "github.com/hoijui/circuit/pkg/use/errors" ) // ?? diff --git a/kit/kit.go b/pkg/kit/kit.go similarity index 100% rename from kit/kit.go rename to pkg/kit/kit.go diff --git a/kit/lang/hash.go b/pkg/kit/lang/hash.go similarity index 100% rename from kit/lang/hash.go rename to pkg/kit/lang/hash.go diff --git a/kit/lang/hash_test.go b/pkg/kit/lang/hash_test.go similarity index 100% rename from kit/lang/hash_test.go rename to pkg/kit/lang/hash_test.go diff --git a/kit/llrb/ORIGIN b/pkg/kit/llrb/ORIGIN similarity index 100% rename from kit/llrb/ORIGIN rename to pkg/kit/llrb/ORIGIN diff --git a/kit/llrb/avgvar.go b/pkg/kit/llrb/avgvar.go similarity index 100% rename from kit/llrb/avgvar.go rename to pkg/kit/llrb/avgvar.go diff --git a/kit/llrb/llrb-stats.go b/pkg/kit/llrb/llrb-stats.go similarity index 100% rename from kit/llrb/llrb-stats.go rename to pkg/kit/llrb/llrb-stats.go diff --git a/kit/llrb/llrb.go b/pkg/kit/llrb/llrb.go similarity index 100% rename from kit/llrb/llrb.go rename to pkg/kit/llrb/llrb.go diff --git a/kit/llrb/llrb_test.go b/pkg/kit/llrb/llrb_test.go similarity index 100% rename from kit/llrb/llrb_test.go rename to pkg/kit/llrb/llrb_test.go diff --git a/kit/lockfile/lockfile.go b/pkg/kit/lockfile/lockfile.go similarity index 100% rename from kit/lockfile/lockfile.go rename to pkg/kit/lockfile/lockfile.go diff --git a/kit/lockfile/lockfile_test.go b/pkg/kit/lockfile/lockfile_test.go similarity index 100% rename from kit/lockfile/lockfile_test.go rename to pkg/kit/lockfile/lockfile_test.go diff --git a/kit/module/slot.go b/pkg/kit/module/slot.go similarity index 100% rename from kit/module/slot.go rename to pkg/kit/module/slot.go diff --git a/kit/posix/posix.go b/pkg/kit/posix/posix.go similarity index 100% rename from kit/posix/posix.go rename to pkg/kit/posix/posix.go diff --git a/kit/posix/shell.go b/pkg/kit/posix/shell.go similarity index 98% rename from kit/posix/shell.go rename to pkg/kit/posix/shell.go index 351b104..33ec06d 100644 --- a/kit/posix/shell.go +++ b/pkg/kit/posix/shell.go @@ -9,7 +9,7 @@ package posix import ( "bytes" - "github.com/hoijui/circuit/kit/iomisc" + "github.com/hoijui/circuit/pkg/kit/iomisc" "io" "os" "os/exec" diff --git a/kit/pty/License b/pkg/kit/pty/License similarity index 100% rename from kit/pty/License rename to pkg/kit/pty/License diff --git a/kit/pty/ORIGIN b/pkg/kit/pty/ORIGIN similarity index 100% rename from kit/pty/ORIGIN rename to pkg/kit/pty/ORIGIN diff --git a/kit/pty/README.md b/pkg/kit/pty/README.md similarity index 100% rename from kit/pty/README.md rename to pkg/kit/pty/README.md diff --git a/kit/pty/doc.go b/pkg/kit/pty/doc.go similarity index 100% rename from kit/pty/doc.go rename to pkg/kit/pty/doc.go diff --git a/kit/pty/pty_darwin.go b/pkg/kit/pty/pty_darwin.go similarity index 100% rename from kit/pty/pty_darwin.go rename to pkg/kit/pty/pty_darwin.go diff --git a/kit/pty/pty_linux.go b/pkg/kit/pty/pty_linux.go similarity index 100% rename from kit/pty/pty_linux.go rename to pkg/kit/pty/pty_linux.go diff --git a/kit/pty/run.go b/pkg/kit/pty/run.go similarity index 100% rename from kit/pty/run.go rename to pkg/kit/pty/run.go diff --git a/kit/pty/util.go b/pkg/kit/pty/util.go similarity index 100% rename from kit/pty/util.go rename to pkg/kit/pty/util.go diff --git a/kit/pubsub/lossyring.go b/pkg/kit/pubsub/lossyring.go similarity index 100% rename from kit/pubsub/lossyring.go rename to pkg/kit/pubsub/lossyring.go diff --git a/kit/pubsub/lossyring_test.go b/pkg/kit/pubsub/lossyring_test.go similarity index 100% rename from kit/pubsub/lossyring_test.go rename to pkg/kit/pubsub/lossyring_test.go diff --git a/kit/pubsub/pubsub.go b/pkg/kit/pubsub/pubsub.go similarity index 99% rename from kit/pubsub/pubsub.go rename to pkg/kit/pubsub/pubsub.go index 631a645..96ece0c 100644 --- a/kit/pubsub/pubsub.go +++ b/pkg/kit/pubsub/pubsub.go @@ -12,7 +12,7 @@ import ( "runtime" "sync" - "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/pkg/use/circuit" ) // PubSub… diff --git a/kit/sched/limiter/l.go b/pkg/kit/sched/limiter/l.go similarity index 100% rename from kit/sched/limiter/l.go rename to pkg/kit/sched/limiter/l.go diff --git a/kit/sched/limiter/l_test.go b/pkg/kit/sched/limiter/l_test.go similarity index 100% rename from kit/sched/limiter/l_test.go rename to pkg/kit/sched/limiter/l_test.go diff --git a/kit/sched/quota.go b/pkg/kit/sched/quota.go similarity index 100% rename from kit/sched/quota.go rename to pkg/kit/sched/quota.go diff --git a/kit/sched/sched.go b/pkg/kit/sched/sched.go similarity index 100% rename from kit/sched/sched.go rename to pkg/kit/sched/sched.go diff --git a/kit/shell/shell.go b/pkg/kit/shell/shell.go similarity index 92% rename from kit/shell/shell.go rename to pkg/kit/shell/shell.go index 4d02822..1f4c129 100644 --- a/kit/shell/shell.go +++ b/pkg/kit/shell/shell.go @@ -10,10 +10,10 @@ package shell import ( "io" - xyexec "github.com/hoijui/circuit/kit/x/exec" - xyio "github.com/hoijui/circuit/kit/x/io" - "github.com/hoijui/circuit/use/circuit" - "github.com/hoijui/circuit/use/errors" + xyexec "github.com/hoijui/circuit/pkg/kit/x/exec" + xyio "github.com/hoijui/circuit/pkg/kit/x/io" + "github.com/hoijui/circuit/pkg/use/circuit" + "github.com/hoijui/circuit/pkg/use/errors" ) // XXX: Run commands in their own process groups? diff --git a/kit/shell/shell_test.go b/pkg/kit/shell/shell_test.go similarity index 100% rename from kit/shell/shell_test.go rename to pkg/kit/shell/shell_test.go diff --git a/kit/stat/histogram.go b/pkg/kit/stat/histogram.go similarity index 100% rename from kit/stat/histogram.go rename to pkg/kit/stat/histogram.go diff --git a/kit/stat/moment.go b/pkg/kit/stat/moment.go similarity index 100% rename from kit/stat/moment.go rename to pkg/kit/stat/moment.go diff --git a/kit/stat/sliding.go b/pkg/kit/stat/sliding.go similarity index 100% rename from kit/stat/sliding.go rename to pkg/kit/stat/sliding.go diff --git a/kit/stat/sliding_test.go b/pkg/kit/stat/sliding_test.go similarity index 100% rename from kit/stat/sliding_test.go rename to pkg/kit/stat/sliding_test.go diff --git a/kit/stat/time.go b/pkg/kit/stat/time.go similarity index 100% rename from kit/stat/time.go rename to pkg/kit/stat/time.go diff --git a/kit/symbolizer/_symbolizer_test.go b/pkg/kit/symbolizer/_symbolizer_test.go similarity index 100% rename from kit/symbolizer/_symbolizer_test.go rename to pkg/kit/symbolizer/_symbolizer_test.go diff --git a/kit/symbolizer/simplify.go b/pkg/kit/symbolizer/simplify.go similarity index 100% rename from kit/symbolizer/simplify.go rename to pkg/kit/symbolizer/simplify.go diff --git a/kit/symbolizer/symbolizer.go b/pkg/kit/symbolizer/symbolizer.go similarity index 100% rename from kit/symbolizer/symbolizer.go rename to pkg/kit/symbolizer/symbolizer.go diff --git a/kit/sync/trigger.go b/pkg/kit/sync/trigger.go similarity index 100% rename from kit/sync/trigger.go rename to pkg/kit/sync/trigger.go diff --git a/kit/sync/until.go b/pkg/kit/sync/until.go similarity index 100% rename from kit/sync/until.go rename to pkg/kit/sync/until.go diff --git a/kit/tele/LICENSE b/pkg/kit/tele/LICENSE similarity index 100% rename from kit/tele/LICENSE rename to pkg/kit/tele/LICENSE diff --git a/kit/tele/blend/_blend_test.go b/pkg/kit/tele/blend/_blend_test.go similarity index 85% rename from kit/tele/blend/_blend_test.go rename to pkg/kit/tele/blend/_blend_test.go index 9c7c5d8..af24db9 100644 --- a/kit/tele/blend/_blend_test.go +++ b/pkg/kit/tele/blend/_blend_test.go @@ -13,12 +13,12 @@ import ( "testing" "time" - _ "github.com/hoijui/circuit/kit/debug/ctrlc" - "github.com/hoijui/circuit/kit/tele/chain" - "github.com/hoijui/circuit/kit/tele/codec" - "github.com/hoijui/circuit/kit/tele/faithful" - "github.com/hoijui/circuit/kit/tele/sandbox" - "github.com/hoijui/circuit/kit/tele/trace" + _ "github.com/hoijui/circuit/pkg/kit/debug/ctrlc" + "github.com/hoijui/circuit/pkg/kit/tele/chain" + "github.com/hoijui/circuit/pkg/kit/tele/codec" + "github.com/hoijui/circuit/pkg/kit/tele/faithful" + "github.com/hoijui/circuit/pkg/kit/tele/sandbox" + "github.com/hoijui/circuit/pkg/kit/tele/trace" ) type testMsg struct { diff --git a/kit/tele/blend/_close_test.go b/pkg/kit/tele/blend/_close_test.go similarity index 79% rename from kit/tele/blend/_close_test.go rename to pkg/kit/tele/blend/_close_test.go index 26398da..147fcca 100644 --- a/kit/tele/blend/_close_test.go +++ b/pkg/kit/tele/blend/_close_test.go @@ -12,12 +12,12 @@ import ( "testing" "time" - _ "github.com/hoijui/circuit/kit/debug/ctrlc" - "github.com/hoijui/circuit/kit/tele/chain" - "github.com/hoijui/circuit/kit/tele/codec" - "github.com/hoijui/circuit/kit/tele/faithful" - "github.com/hoijui/circuit/kit/tele/tcp" - "github.com/hoijui/circuit/kit/tele/trace" + _ "github.com/hoijui/circuit/pkg/kit/debug/ctrlc" + "github.com/hoijui/circuit/pkg/kit/tele/chain" + "github.com/hoijui/circuit/pkg/kit/tele/codec" + "github.com/hoijui/circuit/pkg/kit/tele/faithful" + "github.com/hoijui/circuit/pkg/kit/tele/tcp" + "github.com/hoijui/circuit/pkg/kit/tele/trace" ) func TestClosure(t *testing.T) { diff --git a/kit/tele/blend/conn.go b/pkg/kit/tele/blend/conn.go similarity index 100% rename from kit/tele/blend/conn.go rename to pkg/kit/tele/blend/conn.go diff --git a/kit/tele/blend/dialer.go b/pkg/kit/tele/blend/dialer.go similarity index 88% rename from kit/tele/blend/dialer.go rename to pkg/kit/tele/blend/dialer.go index 0067e52..3eccb01 100644 --- a/kit/tele/blend/dialer.go +++ b/pkg/kit/tele/blend/dialer.go @@ -10,8 +10,8 @@ package blend import ( "net" - "github.com/hoijui/circuit/kit/tele/codec" - "github.com/hoijui/circuit/kit/tele/trace" + "github.com/hoijui/circuit/pkg/kit/tele/codec" + "github.com/hoijui/circuit/pkg/kit/tele/trace" ) type Dialer struct { diff --git a/kit/tele/blend/error.go b/pkg/kit/tele/blend/error.go similarity index 100% rename from kit/tele/blend/error.go rename to pkg/kit/tele/blend/error.go diff --git a/kit/tele/blend/listener.go b/pkg/kit/tele/blend/listener.go similarity index 87% rename from kit/tele/blend/listener.go rename to pkg/kit/tele/blend/listener.go index 1c2a2d8..c19b2d2 100644 --- a/kit/tele/blend/listener.go +++ b/pkg/kit/tele/blend/listener.go @@ -10,8 +10,8 @@ package blend import ( "net" - "github.com/hoijui/circuit/kit/tele/codec" - "github.com/hoijui/circuit/kit/tele/trace" + "github.com/hoijui/circuit/pkg/kit/tele/codec" + "github.com/hoijui/circuit/pkg/kit/tele/trace" ) type Listener struct { diff --git a/kit/tele/blend/msg.go b/pkg/kit/tele/blend/msg.go similarity index 100% rename from kit/tele/blend/msg.go rename to pkg/kit/tele/blend/msg.go diff --git a/kit/tele/blend/session.go b/pkg/kit/tele/blend/session.go similarity index 98% rename from kit/tele/blend/session.go rename to pkg/kit/tele/blend/session.go index 300ac5e..5f4f7fe 100644 --- a/kit/tele/blend/session.go +++ b/pkg/kit/tele/blend/session.go @@ -13,8 +13,8 @@ import ( "sync" "time" - "github.com/hoijui/circuit/kit/tele/codec" - "github.com/hoijui/circuit/kit/tele/trace" + "github.com/hoijui/circuit/pkg/kit/tele/codec" + "github.com/hoijui/circuit/pkg/kit/tele/trace" ) // AcceptSession diff --git a/kit/tele/blend/transport.go b/pkg/kit/tele/blend/transport.go similarity index 87% rename from kit/tele/blend/transport.go rename to pkg/kit/tele/blend/transport.go index b0d1e07..4b20907 100644 --- a/kit/tele/blend/transport.go +++ b/pkg/kit/tele/blend/transport.go @@ -10,8 +10,8 @@ package blend import ( "net" - "github.com/hoijui/circuit/kit/tele/codec" - "github.com/hoijui/circuit/kit/tele/trace" + "github.com/hoijui/circuit/pkg/kit/tele/codec" + "github.com/hoijui/circuit/pkg/kit/tele/trace" ) type Transport struct { diff --git a/kit/tele/codec/_codec_test.go b/pkg/kit/tele/codec/_codec_test.go similarity index 86% rename from kit/tele/codec/_codec_test.go rename to pkg/kit/tele/codec/_codec_test.go index bcd11e3..14150a3 100644 --- a/kit/tele/codec/_codec_test.go +++ b/pkg/kit/tele/codec/_codec_test.go @@ -12,11 +12,11 @@ import ( "testing" "time" - _ "github.com/hoijui/circuit/kit/debug/ctrlc" - "github.com/hoijui/circuit/kit/tele/chain" - "github.com/hoijui/circuit/kit/tele/faithful" - "github.com/hoijui/circuit/kit/tele/sandbox" - "github.com/hoijui/circuit/kit/tele/trace" + _ "github.com/hoijui/circuit/pkg/kit/debug/ctrlc" + "github.com/hoijui/circuit/pkg/kit/tele/chain" + "github.com/hoijui/circuit/pkg/kit/tele/faithful" + "github.com/hoijui/circuit/pkg/kit/tele/sandbox" + "github.com/hoijui/circuit/pkg/kit/tele/trace" ) type testMsg struct { diff --git a/kit/tele/codec/codec.go b/pkg/kit/tele/codec/codec.go similarity index 100% rename from kit/tele/codec/codec.go rename to pkg/kit/tele/codec/codec.go diff --git a/kit/tele/codec/conn.go b/pkg/kit/tele/codec/conn.go similarity index 100% rename from kit/tele/codec/conn.go rename to pkg/kit/tele/codec/conn.go diff --git a/kit/tele/codec/gob.go b/pkg/kit/tele/codec/gob.go similarity index 100% rename from kit/tele/codec/gob.go rename to pkg/kit/tele/codec/gob.go diff --git a/kit/tele/codec/gob_test.go b/pkg/kit/tele/codec/gob_test.go similarity index 100% rename from kit/tele/codec/gob_test.go rename to pkg/kit/tele/codec/gob_test.go diff --git a/kit/tele/codec/transport.go b/pkg/kit/tele/codec/transport.go similarity index 100% rename from kit/tele/codec/transport.go rename to pkg/kit/tele/codec/transport.go diff --git a/kit/tele/doc.go b/pkg/kit/tele/doc.go similarity index 100% rename from kit/tele/doc.go rename to pkg/kit/tele/doc.go diff --git a/kit/tele/hmac/addr.go b/pkg/kit/tele/hmac/addr.go similarity index 100% rename from kit/tele/hmac/addr.go rename to pkg/kit/tele/hmac/addr.go diff --git a/kit/tele/hmac/codec.go b/pkg/kit/tele/hmac/codec.go similarity index 98% rename from kit/tele/hmac/codec.go rename to pkg/kit/tele/hmac/codec.go index 6f6e460..1fb8330 100644 --- a/kit/tele/hmac/codec.go +++ b/pkg/kit/tele/hmac/codec.go @@ -25,8 +25,8 @@ import ( //"runtime/debug" "strings" - "github.com/hoijui/circuit/kit/tele/codec" - "github.com/hoijui/circuit/kit/tele/trace" + "github.com/hoijui/circuit/pkg/kit/tele/codec" + "github.com/hoijui/circuit/pkg/kit/tele/trace" ) func NewTransport(key []byte) codec.CarrierTransport { diff --git a/kit/tele/limiter/l.go b/pkg/kit/tele/limiter/l.go similarity index 100% rename from kit/tele/limiter/l.go rename to pkg/kit/tele/limiter/l.go diff --git a/kit/tele/limiter/l_test.go b/pkg/kit/tele/limiter/l_test.go similarity index 100% rename from kit/tele/limiter/l_test.go rename to pkg/kit/tele/limiter/l_test.go diff --git a/kit/tele/tcp/addr.go b/pkg/kit/tele/tcp/addr.go similarity index 100% rename from kit/tele/tcp/addr.go rename to pkg/kit/tele/tcp/addr.go diff --git a/kit/tele/tcp/codec.go b/pkg/kit/tele/tcp/codec.go similarity index 95% rename from kit/tele/tcp/codec.go rename to pkg/kit/tele/tcp/codec.go index 424a1e1..8b8ab89 100644 --- a/kit/tele/tcp/codec.go +++ b/pkg/kit/tele/tcp/codec.go @@ -15,8 +15,8 @@ import ( "net" "strings" - "github.com/hoijui/circuit/kit/tele/codec" - "github.com/hoijui/circuit/kit/tele/trace" + "github.com/hoijui/circuit/pkg/kit/tele/codec" + "github.com/hoijui/circuit/pkg/kit/tele/trace" ) // CodecTransport is a codec.Carrier over TCP. diff --git a/kit/tele/tele.go b/pkg/kit/tele/tele.go similarity index 75% rename from kit/tele/tele.go rename to pkg/kit/tele/tele.go index fde0a59..94e38b7 100644 --- a/kit/tele/tele.go +++ b/pkg/kit/tele/tele.go @@ -8,11 +8,11 @@ package tele import ( - "github.com/hoijui/circuit/kit/tele/blend" - "github.com/hoijui/circuit/kit/tele/codec" - "github.com/hoijui/circuit/kit/tele/hmac" - "github.com/hoijui/circuit/kit/tele/tcp" - "github.com/hoijui/circuit/kit/tele/trace" + "github.com/hoijui/circuit/pkg/kit/tele/blend" + "github.com/hoijui/circuit/pkg/kit/tele/codec" + "github.com/hoijui/circuit/pkg/kit/tele/hmac" + "github.com/hoijui/circuit/pkg/kit/tele/tcp" + "github.com/hoijui/circuit/pkg/kit/tele/trace" ) func NewStructOverTCP() *blend.Transport { diff --git a/kit/tele/trace/fmt.go b/pkg/kit/tele/trace/fmt.go similarity index 100% rename from kit/tele/trace/fmt.go rename to pkg/kit/tele/trace/fmt.go diff --git a/kit/tele/trace/frame.go b/pkg/kit/tele/trace/frame.go similarity index 100% rename from kit/tele/trace/frame.go rename to pkg/kit/tele/trace/frame.go diff --git a/kit/tele/trace/ticket.go b/pkg/kit/tele/trace/ticket.go similarity index 100% rename from kit/tele/trace/ticket.go rename to pkg/kit/tele/trace/ticket.go diff --git a/kit/term/MAINTAINERS b/pkg/kit/term/MAINTAINERS similarity index 100% rename from kit/term/MAINTAINERS rename to pkg/kit/term/MAINTAINERS diff --git a/kit/term/ORIGIN b/pkg/kit/term/ORIGIN similarity index 100% rename from kit/term/ORIGIN rename to pkg/kit/term/ORIGIN diff --git a/kit/term/term.go b/pkg/kit/term/term.go similarity index 100% rename from kit/term/term.go rename to pkg/kit/term/term.go diff --git a/kit/term/termios_darwin.go b/pkg/kit/term/termios_darwin.go similarity index 100% rename from kit/term/termios_darwin.go rename to pkg/kit/term/termios_darwin.go diff --git a/kit/term/termios_linux.go b/pkg/kit/term/termios_linux.go similarity index 100% rename from kit/term/termios_linux.go rename to pkg/kit/term/termios_linux.go diff --git a/kit/x/doc.go b/pkg/kit/x/doc.go similarity index 100% rename from kit/x/doc.go rename to pkg/kit/x/doc.go diff --git a/kit/x/exec/exec.go b/pkg/kit/x/exec/exec.go similarity index 95% rename from kit/x/exec/exec.go rename to pkg/kit/x/exec/exec.go index fc13d7f..6b49324 100644 --- a/kit/x/exec/exec.go +++ b/pkg/kit/x/exec/exec.go @@ -14,10 +14,10 @@ import ( "sync" "syscall" - "github.com/hoijui/circuit/kit/pty" - xyio "github.com/hoijui/circuit/kit/x/io" - "github.com/hoijui/circuit/use/circuit" - "github.com/hoijui/circuit/use/errors" + "github.com/hoijui/circuit/pkg/kit/pty" + xyio "github.com/hoijui/circuit/pkg/kit/x/io" + "github.com/hoijui/circuit/pkg/use/circuit" + "github.com/hoijui/circuit/pkg/use/errors" ) // XCmd exports chroot-ed shells. diff --git a/kit/x/file/file.go b/pkg/kit/x/file/file.go similarity index 98% rename from kit/x/file/file.go rename to pkg/kit/x/file/file.go index 6afee38..d821240 100644 --- a/kit/x/file/file.go +++ b/pkg/kit/x/file/file.go @@ -15,8 +15,8 @@ import ( "os" "runtime" - "github.com/hoijui/circuit/use/circuit" - "github.com/hoijui/circuit/use/errors" + "github.com/hoijui/circuit/pkg/use/circuit" + "github.com/hoijui/circuit/pkg/use/errors" ) func init() { diff --git a/kit/x/file/fileinfo.go b/pkg/kit/x/file/fileinfo.go similarity index 100% rename from kit/x/file/fileinfo.go rename to pkg/kit/x/file/fileinfo.go diff --git a/kit/x/io/io.go b/pkg/kit/x/io/io.go similarity index 98% rename from kit/x/io/io.go rename to pkg/kit/x/io/io.go index d0df42b..2b95649 100644 --- a/kit/x/io/io.go +++ b/pkg/kit/x/io/io.go @@ -13,8 +13,8 @@ import ( "runtime" "time" - "github.com/hoijui/circuit/use/circuit" - "github.com/hoijui/circuit/use/errors" + "github.com/hoijui/circuit/pkg/use/circuit" + "github.com/hoijui/circuit/pkg/use/errors" ) func init() { diff --git a/kit/xor/util.go b/pkg/kit/xor/util.go similarity index 100% rename from kit/xor/util.go rename to pkg/kit/xor/util.go diff --git a/kit/xor/xor.go b/pkg/kit/xor/xor.go similarity index 100% rename from kit/xor/xor.go rename to pkg/kit/xor/xor.go diff --git a/kit/xor/xor_test.go b/pkg/kit/xor/xor_test.go similarity index 100% rename from kit/xor/xor_test.go rename to pkg/kit/xor/xor_test.go diff --git a/sys/acid/acid.go b/pkg/sys/acid/acid.go similarity index 94% rename from sys/acid/acid.go rename to pkg/sys/acid/acid.go index d388ad8..e7a9ea2 100644 --- a/sys/acid/acid.go +++ b/pkg/sys/acid/acid.go @@ -15,8 +15,8 @@ import ( "runtime/pprof" "time" - "github.com/hoijui/circuit/use/circuit" - "github.com/hoijui/circuit/use/errors" + "github.com/hoijui/circuit/pkg/use/circuit" + "github.com/hoijui/circuit/pkg/use/errors" ) func New() *Acid { diff --git a/sys/acid/behalf.go b/pkg/sys/acid/behalf.go similarity index 95% rename from sys/acid/behalf.go rename to pkg/sys/acid/behalf.go index 63ca642..b1742da 100644 --- a/sys/acid/behalf.go +++ b/pkg/sys/acid/behalf.go @@ -8,7 +8,7 @@ package acid import ( - "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/pkg/use/circuit" "fmt" "reflect" ) diff --git a/sys/lang/README b/pkg/sys/lang/README similarity index 100% rename from sys/lang/README rename to pkg/sys/lang/README diff --git a/sys/lang/TODO b/pkg/sys/lang/TODO similarity index 100% rename from sys/lang/TODO rename to pkg/sys/lang/TODO diff --git a/sys/lang/_ptrptr_test.go b/pkg/sys/lang/_ptrptr_test.go similarity index 100% rename from sys/lang/_ptrptr_test.go rename to pkg/sys/lang/_ptrptr_test.go diff --git a/sys/lang/_runtime_test.go b/pkg/sys/lang/_runtime_test.go similarity index 97% rename from sys/lang/_runtime_test.go rename to pkg/sys/lang/_runtime_test.go index e0737f6..e537753 100644 --- a/sys/lang/_runtime_test.go +++ b/pkg/sys/lang/_runtime_test.go @@ -8,8 +8,8 @@ package lang import ( - "github.com/hoijui/circuit/sys/lang/types" - "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/pkg/sys/lang/types" + "github.com/hoijui/circuit/pkg/use/circuit" "fmt" "runtime" "strconv" diff --git a/sys/lang/call.go b/pkg/sys/lang/call.go similarity index 96% rename from sys/lang/call.go rename to pkg/sys/lang/call.go index dd020ef..e1a4e34 100644 --- a/sys/lang/call.go +++ b/pkg/sys/lang/call.go @@ -8,7 +8,7 @@ package lang import ( - "github.com/hoijui/circuit/sys/lang/types" + "github.com/hoijui/circuit/pkg/sys/lang/types" "fmt" "reflect" "runtime/debug" diff --git a/sys/lang/dial.go b/pkg/sys/lang/dial.go similarity index 95% rename from sys/lang/dial.go rename to pkg/sys/lang/dial.go index 06c8b79..e554902 100644 --- a/sys/lang/dial.go +++ b/pkg/sys/lang/dial.go @@ -11,9 +11,9 @@ import ( //"fmt" //"runtime/debug" - "github.com/hoijui/circuit/sys/lang/types" - "github.com/hoijui/circuit/use/circuit" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/sys/lang/types" + "github.com/hoijui/circuit/pkg/use/circuit" + "github.com/hoijui/circuit/pkg/use/n" ) func (r *Runtime) Listen(service string, receiver interface{}) { diff --git a/sys/lang/doc.go b/pkg/sys/lang/doc.go similarity index 89% rename from sys/lang/doc.go rename to pkg/sys/lang/doc.go index 17458ab..8fbec15 100644 --- a/sys/lang/doc.go +++ b/pkg/sys/lang/doc.go @@ -11,7 +11,7 @@ package lang FORKING A GO ROUTINE ON A REMOTE RUNTIME - import . "github.com/hoijui/circuit/use/circuit" + import . "github.com/hoijui/circuit/pkg/use/circuit" type MyFunc struct{} func (MyFunc) AnyName(anyArg anyType) (anyReturn anyType) { diff --git a/sys/lang/error.go b/pkg/sys/lang/error.go similarity index 100% rename from sys/lang/error.go rename to pkg/sys/lang/error.go diff --git a/sys/lang/exp.go b/pkg/sys/lang/exp.go similarity index 96% rename from sys/lang/exp.go rename to pkg/sys/lang/exp.go index b9a3a97..1eacd1e 100644 --- a/sys/lang/exp.go +++ b/pkg/sys/lang/exp.go @@ -13,9 +13,9 @@ import ( "runtime" "sync" - "github.com/hoijui/circuit/sys/lang/types" - "github.com/hoijui/circuit/use/circuit" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/sys/lang/types" + "github.com/hoijui/circuit/pkg/use/circuit" + "github.com/hoijui/circuit/pkg/use/n" ) // expTabl issues (and reclaims) universal handles to local values diff --git a/sys/lang/flat.go b/pkg/sys/lang/flat.go similarity index 100% rename from sys/lang/flat.go rename to pkg/sys/lang/flat.go diff --git a/sys/lang/freeze.go b/pkg/sys/lang/freeze.go similarity index 100% rename from sys/lang/freeze.go rename to pkg/sys/lang/freeze.go diff --git a/sys/lang/freeze_test.go b/pkg/sys/lang/freeze_test.go similarity index 92% rename from sys/lang/freeze_test.go rename to pkg/sys/lang/freeze_test.go index 656227d..30e33cc 100644 --- a/sys/lang/freeze_test.go +++ b/pkg/sys/lang/freeze_test.go @@ -10,7 +10,7 @@ package lang import ( "fmt" "testing" - "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/pkg/use/circuit" ) func TestExportImport(t *testing.T) { diff --git a/sys/lang/func.go b/pkg/sys/lang/func.go similarity index 94% rename from sys/lang/func.go rename to pkg/sys/lang/func.go index 55050c3..5d27cd0 100644 --- a/sys/lang/func.go +++ b/pkg/sys/lang/func.go @@ -15,11 +15,11 @@ import ( "runtime/pprof" "time" - "github.com/hoijui/circuit/sys/lang/types" - "github.com/hoijui/circuit/use/circuit" - "github.com/hoijui/circuit/use/errors" - "github.com/hoijui/circuit/use/n" - "github.com/hoijui/circuit/use/worker" + "github.com/hoijui/circuit/pkg/sys/lang/types" + "github.com/hoijui/circuit/pkg/use/circuit" + "github.com/hoijui/circuit/pkg/use/errors" + "github.com/hoijui/circuit/pkg/use/n" + "github.com/hoijui/circuit/pkg/use/worker" ) func (r *Runtime) Kill(addr n.Addr) error { diff --git a/sys/lang/imp.go b/pkg/sys/lang/imp.go similarity index 96% rename from sys/lang/imp.go rename to pkg/sys/lang/imp.go index 65b67f5..43f489a 100644 --- a/sys/lang/imp.go +++ b/pkg/sys/lang/imp.go @@ -13,9 +13,9 @@ import ( "runtime" "sync" - "github.com/hoijui/circuit/sys/lang/types" - "github.com/hoijui/circuit/use/circuit" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/sys/lang/types" + "github.com/hoijui/circuit/pkg/use/circuit" + "github.com/hoijui/circuit/pkg/use/n" ) // impTabl keeps track of values that have been imported diff --git a/sys/lang/lang.go b/pkg/sys/lang/lang.go similarity index 94% rename from sys/lang/lang.go rename to pkg/sys/lang/lang.go index 7c6052a..ee16704 100644 --- a/sys/lang/lang.go +++ b/pkg/sys/lang/lang.go @@ -9,9 +9,9 @@ package lang import ( - "github.com/hoijui/circuit/kit/lang" - "github.com/hoijui/circuit/use/circuit" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/kit/lang" + "github.com/hoijui/circuit/pkg/use/circuit" + "github.com/hoijui/circuit/pkg/use/n" ) // _ref wraps a user object, indicating to the runtime that the user has diff --git a/sys/lang/msg.go b/pkg/sys/lang/msg.go similarity index 96% rename from sys/lang/msg.go rename to pkg/sys/lang/msg.go index 6d89089..b4931b1 100644 --- a/sys/lang/msg.go +++ b/pkg/sys/lang/msg.go @@ -11,9 +11,9 @@ import ( "encoding/gob" "fmt" - "github.com/hoijui/circuit/sys/lang/types" - "github.com/hoijui/circuit/use/circuit" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/sys/lang/types" + "github.com/hoijui/circuit/pkg/use/circuit" + "github.com/hoijui/circuit/pkg/use/n" ) func init() { diff --git a/sys/lang/perm.go b/pkg/sys/lang/perm.go similarity index 100% rename from sys/lang/perm.go rename to pkg/sys/lang/perm.go diff --git a/sys/lang/prof/profile.go b/pkg/sys/lang/prof/profile.go similarity index 98% rename from sys/lang/prof/profile.go rename to pkg/sys/lang/prof/profile.go index d8694b4..d137db5 100644 --- a/sys/lang/prof/profile.go +++ b/pkg/sys/lang/prof/profile.go @@ -9,7 +9,7 @@ package prof import ( - "github.com/hoijui/circuit/kit/stat" + "github.com/hoijui/circuit/pkg/kit/stat" "sync" "time" ) diff --git a/sys/lang/prof/stat.go b/pkg/sys/lang/prof/stat.go similarity index 100% rename from sys/lang/prof/stat.go rename to pkg/sys/lang/prof/stat.go diff --git a/sys/lang/prof/stopwatch.go b/pkg/sys/lang/prof/stopwatch.go similarity index 100% rename from sys/lang/prof/stopwatch.go rename to pkg/sys/lang/prof/stopwatch.go diff --git a/sys/lang/ptrptr.go b/pkg/sys/lang/ptrptr.go similarity index 94% rename from sys/lang/ptrptr.go rename to pkg/sys/lang/ptrptr.go index c15abd7..3207bf2 100644 --- a/sys/lang/ptrptr.go +++ b/pkg/sys/lang/ptrptr.go @@ -10,8 +10,8 @@ package lang import ( "strings" - "github.com/hoijui/circuit/use/circuit" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/use/circuit" + "github.com/hoijui/circuit/pkg/use/n" ) func (r *Runtime) callGetPtr(srcID circuit.HandleID, exporter n.Addr) (circuit.X, error) { diff --git a/sys/lang/readwriter.go b/pkg/sys/lang/readwriter.go similarity index 97% rename from sys/lang/readwriter.go rename to pkg/sys/lang/readwriter.go index cd8b0a8..c38896f 100644 --- a/sys/lang/readwriter.go +++ b/pkg/sys/lang/readwriter.go @@ -14,7 +14,7 @@ import ( "net" "sync" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/use/n" ) func NewBytesConn(addr string) n.Conn { diff --git a/sys/lang/runtime.go b/pkg/sys/lang/runtime.go similarity index 91% rename from sys/lang/runtime.go rename to pkg/sys/lang/runtime.go index d3dc0dd..ee92a6e 100644 --- a/sys/lang/runtime.go +++ b/pkg/sys/lang/runtime.go @@ -11,11 +11,11 @@ import ( "log" "sync" - "github.com/hoijui/circuit/sys/acid" - "github.com/hoijui/circuit/sys/lang/prof" - "github.com/hoijui/circuit/sys/lang/types" - "github.com/hoijui/circuit/use/circuit" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/sys/acid" + "github.com/hoijui/circuit/pkg/sys/lang/prof" + "github.com/hoijui/circuit/pkg/sys/lang/types" + "github.com/hoijui/circuit/pkg/use/circuit" + "github.com/hoijui/circuit/pkg/use/n" ) // Runtime represents that state of the circuit program at the present moment. diff --git a/sys/lang/sandbox.go b/pkg/sys/lang/sandbox.go similarity index 98% rename from sys/lang/sandbox.go rename to pkg/sys/lang/sandbox.go index c135250..4c52e73 100644 --- a/sys/lang/sandbox.go +++ b/pkg/sys/lang/sandbox.go @@ -13,7 +13,7 @@ import ( "net" "sync" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/use/n" ) type sandbox struct { diff --git a/sys/lang/srv.go b/pkg/sys/lang/srv.go similarity index 100% rename from sys/lang/srv.go rename to pkg/sys/lang/srv.go diff --git a/sys/lang/types/gob.go b/pkg/sys/lang/types/gob.go similarity index 100% rename from sys/lang/types/gob.go rename to pkg/sys/lang/types/gob.go diff --git a/sys/lang/types/register.go b/pkg/sys/lang/types/register.go similarity index 100% rename from sys/lang/types/register.go rename to pkg/sys/lang/types/register.go diff --git a/sys/lang/types/type.go b/pkg/sys/lang/types/type.go similarity index 100% rename from sys/lang/types/type.go rename to pkg/sys/lang/types/type.go diff --git a/sys/lang/types/util.go b/pkg/sys/lang/types/util.go similarity index 100% rename from sys/lang/types/util.go rename to pkg/sys/lang/types/util.go diff --git a/sys/lang/value.go b/pkg/sys/lang/value.go similarity index 98% rename from sys/lang/value.go rename to pkg/sys/lang/value.go index 7081e4f..fe8adf8 100644 --- a/sys/lang/value.go +++ b/pkg/sys/lang/value.go @@ -11,7 +11,7 @@ import ( "log" "strings" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/use/n" ) func (r *Runtime) serveDropPtr(q *dropPtrMsg, conn n.Conn) { diff --git a/sys/lang/vexp.go b/pkg/sys/lang/vexp.go similarity index 98% rename from sys/lang/vexp.go rename to pkg/sys/lang/vexp.go index 9bb853d..cadcad9 100644 --- a/sys/lang/vexp.go +++ b/pkg/sys/lang/vexp.go @@ -13,7 +13,7 @@ import ( "reflect" "sync" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/use/n" ) type exportGroup struct { diff --git a/sys/lang/vimp.go b/pkg/sys/lang/vimp.go similarity index 98% rename from sys/lang/vimp.go rename to pkg/sys/lang/vimp.go index 2f91bb5..aceff45 100644 --- a/sys/lang/vimp.go +++ b/pkg/sys/lang/vimp.go @@ -11,7 +11,7 @@ import ( "reflect" "sync" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/use/n" ) type importGroup struct { diff --git a/sys/lang/vrewrite.go b/pkg/sys/lang/vrewrite.go similarity index 100% rename from sys/lang/vrewrite.go rename to pkg/sys/lang/vrewrite.go diff --git a/sys/lang/vrewrite_test.go b/pkg/sys/lang/vrewrite_test.go similarity index 100% rename from sys/lang/vrewrite_test.go rename to pkg/sys/lang/vrewrite_test.go diff --git a/sys/sys.go b/pkg/sys/sys.go similarity index 100% rename from sys/sys.go rename to pkg/sys/sys.go diff --git a/sys/tele/_tele_test.go b/pkg/sys/tele/_tele_test.go similarity index 97% rename from sys/tele/_tele_test.go rename to pkg/sys/tele/_tele_test.go index 192374f..601501c 100644 --- a/sys/tele/_tele_test.go +++ b/pkg/sys/tele/_tele_test.go @@ -14,7 +14,7 @@ import ( "os" "testing" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/use/n" ) type testMsg struct{} diff --git a/sys/tele/addr.go b/pkg/sys/tele/addr.go similarity index 96% rename from sys/tele/addr.go rename to pkg/sys/tele/addr.go index e5703d4..fdf5873 100644 --- a/sys/tele/addr.go +++ b/pkg/sys/tele/addr.go @@ -15,8 +15,8 @@ import ( "strconv" "strings" - "github.com/hoijui/circuit/use/errors" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/use/errors" + "github.com/hoijui/circuit/pkg/use/n" ) // Addr maintains a single unique instance for each addr. diff --git a/sys/tele/conn.go b/pkg/sys/tele/conn.go similarity index 90% rename from sys/tele/conn.go rename to pkg/sys/tele/conn.go index e4783a3..3a39810 100644 --- a/sys/tele/conn.go +++ b/pkg/sys/tele/conn.go @@ -8,8 +8,8 @@ package tele import ( - "github.com/hoijui/circuit/kit/tele/blend" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/kit/tele/blend" + "github.com/hoijui/circuit/pkg/use/n" ) type Conn struct { diff --git a/sys/tele/dialer.go b/pkg/sys/tele/dialer.go similarity index 94% rename from sys/tele/dialer.go rename to pkg/sys/tele/dialer.go index d2dbb47..b481bd4 100644 --- a/sys/tele/dialer.go +++ b/pkg/sys/tele/dialer.go @@ -12,9 +12,9 @@ import ( "sync" "time" - "github.com/hoijui/circuit/kit/tele/blend" - "github.com/hoijui/circuit/use/errors" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/kit/tele/blend" + "github.com/hoijui/circuit/pkg/use/errors" + "github.com/hoijui/circuit/pkg/use/n" ) // Dialer diff --git a/sys/tele/listener.go b/pkg/sys/tele/listener.go similarity index 96% rename from sys/tele/listener.go rename to pkg/sys/tele/listener.go index 3d0b4f7..4f2eca0 100644 --- a/sys/tele/listener.go +++ b/pkg/sys/tele/listener.go @@ -14,9 +14,9 @@ import ( "os" "sync" - "github.com/hoijui/circuit/kit/tele/blend" - "github.com/hoijui/circuit/use/errors" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/kit/tele/blend" + "github.com/hoijui/circuit/pkg/use/errors" + "github.com/hoijui/circuit/pkg/use/n" ) // Listener diff --git a/sys/tele/transport.go b/pkg/sys/tele/transport.go similarity index 90% rename from sys/tele/transport.go rename to pkg/sys/tele/transport.go index 54c6e27..501b568 100644 --- a/sys/tele/transport.go +++ b/pkg/sys/tele/transport.go @@ -12,9 +12,9 @@ import ( "net" "os" - "github.com/hoijui/circuit/kit/tele" - "github.com/hoijui/circuit/kit/tele/blend" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/kit/tele" + "github.com/hoijui/circuit/pkg/kit/tele/blend" + "github.com/hoijui/circuit/pkg/use/n" ) func init() { diff --git a/tissue/doc.go b/pkg/tissue/doc.go similarity index 100% rename from tissue/doc.go rename to pkg/tissue/doc.go diff --git a/tissue/exo.go b/pkg/tissue/exo.go similarity index 100% rename from tissue/exo.go rename to pkg/tissue/exo.go diff --git a/tissue/folk.go b/pkg/tissue/folk.go similarity index 95% rename from tissue/folk.go rename to pkg/tissue/folk.go index 6fdea2b..1ac4107 100644 --- a/tissue/folk.go +++ b/pkg/tissue/folk.go @@ -10,7 +10,7 @@ package tissue import ( //"sync" - "github.com/hoijui/circuit/kit/lang" + "github.com/hoijui/circuit/pkg/kit/lang" ) type Folk struct { diff --git a/tissue/kin.go b/pkg/tissue/kin.go similarity index 97% rename from tissue/kin.go rename to pkg/tissue/kin.go index 0e674c1..a5cff7b 100644 --- a/tissue/kin.go +++ b/pkg/tissue/kin.go @@ -13,9 +13,9 @@ import ( "sync" //"runtime/debug" - "github.com/hoijui/circuit/kit/lang" - "github.com/hoijui/circuit/use/circuit" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/kit/lang" + "github.com/hoijui/circuit/pkg/use/circuit" + "github.com/hoijui/circuit/pkg/use/n" ) // Kin is a service that maintains connectivity to a small set of 'neighbor' circuits. diff --git a/tissue/locus/locus.go b/pkg/tissue/locus/locus.go similarity index 92% rename from tissue/locus/locus.go rename to pkg/tissue/locus/locus.go index eff9003..0270745 100644 --- a/tissue/locus/locus.go +++ b/pkg/tissue/locus/locus.go @@ -12,12 +12,12 @@ import ( "path" "time" - "github.com/hoijui/circuit/anchor" - srv "github.com/hoijui/circuit/element/server" - "github.com/hoijui/circuit/kit/pubsub" - "github.com/hoijui/circuit/tissue" - "github.com/hoijui/circuit/tissue/tube" - "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/pkg/anchor" + srv "github.com/hoijui/circuit/pkg/element/server" + "github.com/hoijui/circuit/pkg/kit/pubsub" + "github.com/hoijui/circuit/pkg/tissue" + "github.com/hoijui/circuit/pkg/tissue/tube" + "github.com/hoijui/circuit/pkg/use/circuit" ) // Locus is a device that listens to the join/leave events reported by the tissue social diff --git a/tissue/locus/peer.go b/pkg/tissue/locus/peer.go similarity index 84% rename from tissue/locus/peer.go rename to pkg/tissue/locus/peer.go index 1155b7d..ce8ddcf 100644 --- a/tissue/locus/peer.go +++ b/pkg/tissue/locus/peer.go @@ -10,9 +10,9 @@ package locus import ( "encoding/gob" - "github.com/hoijui/circuit/kit/lang" - "github.com/hoijui/circuit/tissue" - "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/pkg/kit/lang" + "github.com/hoijui/circuit/pkg/tissue" + "github.com/hoijui/circuit/pkg/use/circuit" ) // Peer encloses a cross-interface to the tissue system of a circuit worker, as well as diff --git a/tissue/locus/x.go b/pkg/tissue/locus/x.go similarity index 94% rename from tissue/locus/x.go rename to pkg/tissue/locus/x.go index 0cbf509..c052026 100644 --- a/tissue/locus/x.go +++ b/pkg/tissue/locus/x.go @@ -8,7 +8,7 @@ package locus import ( - "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/pkg/use/circuit" ) func init() { diff --git a/tissue/neighborhood.go b/pkg/tissue/neighborhood.go similarity index 97% rename from tissue/neighborhood.go rename to pkg/tissue/neighborhood.go index 5a736d3..2419171 100644 --- a/tissue/neighborhood.go +++ b/pkg/tissue/neighborhood.go @@ -10,7 +10,7 @@ package tissue import ( "sync" - "github.com/hoijui/circuit/kit/lang" + "github.com/hoijui/circuit/pkg/kit/lang" ) // Neighborhood is a set of perm cross-interfaces. diff --git a/tissue/tube/doc.go b/pkg/tissue/tube/doc.go similarity index 100% rename from tissue/tube/doc.go rename to pkg/tissue/tube/doc.go diff --git a/tissue/tube/record.go b/pkg/tissue/tube/record.go similarity index 100% rename from tissue/tube/record.go rename to pkg/tissue/tube/record.go diff --git a/tissue/tube/tube.go b/pkg/tissue/tube/tube.go similarity index 96% rename from tissue/tube/tube.go rename to pkg/tissue/tube/tube.go index 62c5d11..e015017 100644 --- a/tissue/tube/tube.go +++ b/pkg/tissue/tube/tube.go @@ -12,10 +12,10 @@ import ( "sync" "time" - "github.com/hoijui/circuit/tissue" - "github.com/hoijui/circuit/kit/lang" - "github.com/hoijui/circuit/kit/pubsub" - "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/pkg/tissue" + "github.com/hoijui/circuit/pkg/kit/lang" + "github.com/hoijui/circuit/pkg/kit/pubsub" + "github.com/hoijui/circuit/pkg/use/circuit" ) // Tube is a folk data structure that maintains a key-value set sorted by key. diff --git a/tissue/tube/view.go b/pkg/tissue/tube/view.go similarity index 98% rename from tissue/tube/view.go rename to pkg/tissue/tube/view.go index 6dd698f..f7672b7 100644 --- a/tissue/tube/view.go +++ b/pkg/tissue/tube/view.go @@ -13,7 +13,7 @@ import ( "sync" "time" - "github.com/hoijui/circuit/kit/pubsub" + "github.com/hoijui/circuit/pkg/kit/pubsub" ) // View is a folk data structure that maintains a key-value set sorted by key diff --git a/tissue/tube/x.go b/pkg/tissue/tube/x.go similarity index 95% rename from tissue/tube/x.go rename to pkg/tissue/tube/x.go index b79ebe4..09af928 100644 --- a/tissue/tube/x.go +++ b/pkg/tissue/tube/x.go @@ -10,8 +10,8 @@ package tube import ( "time" - "github.com/hoijui/circuit/tissue" - "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/pkg/tissue" + "github.com/hoijui/circuit/pkg/use/circuit" ) // XTube is the interface to a tube, given to the tube's upstream (cross-circiuit) peering tubes. diff --git a/tissue/util.go b/pkg/tissue/util.go similarity index 96% rename from tissue/util.go rename to pkg/tissue/util.go index 14bf84b..747b619 100644 --- a/tissue/util.go +++ b/pkg/tissue/util.go @@ -10,8 +10,8 @@ package tissue import ( "fmt" - "github.com/hoijui/circuit/kit/lang" - "github.com/hoijui/circuit/use/circuit" + "github.com/hoijui/circuit/pkg/kit/lang" + "github.com/hoijui/circuit/pkg/use/circuit" ) func init() { diff --git a/use/anchorfs/anchorfs.go b/pkg/use/anchorfs/anchorfs.go similarity index 96% rename from use/anchorfs/anchorfs.go rename to pkg/use/anchorfs/anchorfs.go index cf44483..5dd47e3 100644 --- a/use/anchorfs/anchorfs.go +++ b/pkg/use/anchorfs/anchorfs.go @@ -13,8 +13,8 @@ import ( "strings" "time" - "github.com/hoijui/circuit/use/errors" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/use/errors" + "github.com/hoijui/circuit/pkg/use/n" ) var ( diff --git a/use/anchorfs/module.go b/pkg/use/anchorfs/module.go similarity index 95% rename from use/anchorfs/module.go rename to pkg/use/anchorfs/module.go index e01f821..d938e0f 100644 --- a/use/anchorfs/module.go +++ b/pkg/use/anchorfs/module.go @@ -8,7 +8,7 @@ package anchorfs import ( - "github.com/hoijui/circuit/kit/module" + "github.com/hoijui/circuit/pkg/kit/module" ) var mod = module.Slot{Name: "anchor file system"} diff --git a/use/circuit/lang.go b/pkg/use/circuit/lang.go similarity index 97% rename from use/circuit/lang.go rename to pkg/use/circuit/lang.go index e6d7f81..315aa75 100644 --- a/use/circuit/lang.go +++ b/pkg/use/circuit/lang.go @@ -11,7 +11,7 @@ import ( "fmt" "math/rand" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/use/n" ) // HandleID is a universal ID referring to a circuit value accessible across workers diff --git a/use/circuit/module.go b/pkg/use/circuit/module.go similarity index 96% rename from use/circuit/module.go rename to pkg/use/circuit/module.go index 51af0dd..42df6cf 100644 --- a/use/circuit/module.go +++ b/pkg/use/circuit/module.go @@ -9,10 +9,10 @@ package circuit import ( - "github.com/hoijui/circuit/kit/module" - "github.com/hoijui/circuit/sys/lang/types" - "github.com/hoijui/circuit/use/n" - "github.com/hoijui/circuit/use/worker" + "github.com/hoijui/circuit/pkg/kit/module" + "github.com/hoijui/circuit/pkg/sys/lang/types" + "github.com/hoijui/circuit/pkg/use/n" + "github.com/hoijui/circuit/pkg/use/worker" ) var mod = module.Slot{Name: "language"} diff --git a/use/circuit/runtime.go b/pkg/use/circuit/runtime.go similarity index 91% rename from use/circuit/runtime.go rename to pkg/use/circuit/runtime.go index 65d312e..c0601cc 100644 --- a/use/circuit/runtime.go +++ b/pkg/use/circuit/runtime.go @@ -8,8 +8,8 @@ package circuit import ( - "github.com/hoijui/circuit/use/n" - "github.com/hoijui/circuit/use/worker" + "github.com/hoijui/circuit/pkg/use/n" + "github.com/hoijui/circuit/pkg/use/worker" ) type runtime interface { diff --git a/use/errors/errors.go b/pkg/use/errors/errors.go similarity index 100% rename from use/errors/errors.go rename to pkg/use/errors/errors.go diff --git a/use/n/id.go b/pkg/use/n/id.go similarity index 97% rename from use/n/id.go rename to pkg/use/n/id.go index 60527ab..a319b17 100644 --- a/use/n/id.go +++ b/pkg/use/n/id.go @@ -13,7 +13,7 @@ import ( "math/rand" "strconv" - "github.com/hoijui/circuit/use/errors" + "github.com/hoijui/circuit/pkg/use/errors" ) var ErrParse = errors.NewError("parse") diff --git a/use/n/module.go b/pkg/use/n/module.go similarity index 94% rename from use/n/module.go rename to pkg/use/n/module.go index 7eae01d..7dc6dd4 100644 --- a/use/n/module.go +++ b/pkg/use/n/module.go @@ -8,7 +8,7 @@ package n import ( - "github.com/hoijui/circuit/kit/module" + "github.com/hoijui/circuit/pkg/kit/module" "net" ) diff --git a/use/n/transport.go b/pkg/use/n/transport.go similarity index 100% rename from use/n/transport.go rename to pkg/use/n/transport.go diff --git a/use/use.go b/pkg/use/use.go similarity index 100% rename from use/use.go rename to pkg/use/use.go diff --git a/use/worker/worker.go b/pkg/use/worker/worker.go similarity index 94% rename from use/worker/worker.go rename to pkg/use/worker/worker.go index 03cf60e..c893b33 100644 --- a/use/worker/worker.go +++ b/pkg/use/worker/worker.go @@ -9,8 +9,8 @@ package worker import ( - "github.com/hoijui/circuit/kit/module" - "github.com/hoijui/circuit/use/n" + "github.com/hoijui/circuit/pkg/kit/module" + "github.com/hoijui/circuit/pkg/use/n" ) // Host is a location where a new worker can be executed. diff --git a/tutorial/nodejs-using-mysql/start-app/main.go b/tutorial/nodejs-using-mysql/start-app/main.go index c35f4fb..c9d952c 100644 --- a/tutorial/nodejs-using-mysql/start-app/main.go +++ b/tutorial/nodejs-using-mysql/start-app/main.go @@ -19,7 +19,7 @@ import ( "strconv" "strings" - "github.com/hoijui/circuit/client" + "github.com/hoijui/circuit/pkg/client" ) var flagAddr = flag.String("addr", "", "circuit server address, looks like circuit://...") diff --git a/tutorial/wait-all/main.go b/tutorial/wait-all/main.go index 668de98..78ed870 100644 --- a/tutorial/wait-all/main.go +++ b/tutorial/wait-all/main.go @@ -12,7 +12,7 @@ import ( "os" "strconv" - "github.com/hoijui/circuit/client" + "github.com/hoijui/circuit/pkg/client" ) const n = 5 diff --git a/tutorial/wait-first/main.go b/tutorial/wait-first/main.go index 7413170..50a3b4b 100644 --- a/tutorial/wait-first/main.go +++ b/tutorial/wait-first/main.go @@ -12,7 +12,7 @@ import ( "os" "strconv" - "github.com/hoijui/circuit/client" + "github.com/hoijui/circuit/pkg/client" ) const n = 5 diff --git a/tutorial/watchbot-with-chan/main.go b/tutorial/watchbot-with-chan/main.go index 67e6446..4b2c113 100644 --- a/tutorial/watchbot-with-chan/main.go +++ b/tutorial/watchbot-with-chan/main.go @@ -34,7 +34,7 @@ import ( "strconv" "time" - "github.com/hoijui/circuit/client" + "github.com/hoijui/circuit/pkg/client" ) // pickServer returns the root anchor of a randomly-chosen circuit server in the cluster. diff --git a/tutorial/watchbot/main.go b/tutorial/watchbot/main.go index 5bb725d..affe615 100644 --- a/tutorial/watchbot/main.go +++ b/tutorial/watchbot/main.go @@ -31,7 +31,7 @@ import ( "os" "time" - "github.com/hoijui/circuit/client" + "github.com/hoijui/circuit/pkg/client" ) // pickServer returns the root anchor of a randomly-chosen circuit server in the cluster. From 4230f31f2f463159cd80b33070fd9110edc228cb Mon Sep 17 00:00:00 2001 From: hoijui Date: Sat, 2 May 2020 08:43:35 +0200 Subject: [PATCH 16/28] add a TODO (make internal dependencies external) --- TODO | 1 + 1 file changed, 1 insertion(+) diff --git a/TODO b/TODO index 931ff3a..f1c5463 100644 --- a/TODO +++ b/TODO @@ -12,3 +12,4 @@ test coverage job scheduler ala mesos add mutex element tty element; interactive shell +use external dependencies instead of local ./github.com/... and ./gocircuit.org/... From 201074a5402b5fa871a40347a8fbc4b23b33f5e0 Mon Sep 17 00:00:00 2001 From: hoijui Date: Sun, 3 May 2020 11:35:46 +0200 Subject: [PATCH 17/28] lots of fixes, found through unit tests [fix] --- github.com/miekg/dns/parse_test.go | 28 ++++++++++++++-------------- pkg/kit/lockfile/lockfile_test.go | 2 +- pkg/kit/pubsub/lossyring_test.go | 2 +- pkg/kit/xor/xor.go | 5 +++-- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/github.com/miekg/dns/parse_test.go b/github.com/miekg/dns/parse_test.go index 346c9cc..d36000b 100644 --- a/github.com/miekg/dns/parse_test.go +++ b/github.com/miekg/dns/parse_test.go @@ -120,16 +120,16 @@ func TestDomainNameAndTXTEscapes(t *testing.T) { if _, err := PackRR(rr2, repacked, 0, nil, false); err != nil { t.Logf("error packing parsed RR: %v", err) t.Logf(" original Bytes: %v\n", rrbytes) - t.Logf("unpacked Struct: %V\n", rr1) - t.Logf(" parsed Struct: %V\n", rr2) + t.Logf("unpacked Struct: %#v\n", rr1) + t.Logf(" parsed Struct: %#v\n", rr2) t.Fail() } if !bytes.Equal(repacked, rrbytes) { t.Log("packed bytes don't match original bytes") t.Logf(" original bytes: %v", rrbytes) t.Logf(" packed bytes: %v", repacked) - t.Logf("unpacked struct: %V", rr1) - t.Logf(" parsed struct: %V", rr2) + t.Logf("unpacked struct: %#v", rr1) + t.Logf(" parsed struct: %#v", rr2) t.Fail() } } @@ -273,14 +273,14 @@ func TestTXTRRQuick(t *testing.T) { buf := make([]byte, len(rrbytes)*3) off, err := PackRR(rr, buf, 0, nil, false) if err != nil { - t.Logf("pack Error: %s\nRR: %V", err.Error(), rr) + t.Logf("pack Error: %s\nRR: %#v", err.Error(), rr) return false } buf = buf[:off] if !bytes.Equal(buf, rrbytes) { t.Logf("packed bytes don't match original bytes") t.Logf("src bytes: %v", rrbytes) - t.Logf(" struct: %V", rr) + t.Logf(" struct: %#v", rr) t.Logf("oUt bytes: %v", buf) return false } @@ -292,7 +292,7 @@ func TestTXTRRQuick(t *testing.T) { rr2, err := NewRR(rrString) if err != nil { t.Logf("error parsing own output: %s", err.Error()) - t.Logf("struct: %V", rr) + t.Logf("struct: %#v", rr) t.Logf("string: %v", rrString) return false } @@ -307,18 +307,18 @@ func TestTXTRRQuick(t *testing.T) { off, err = PackRR(rr2, buf, 0, nil, false) if err != nil { t.Logf("error packing parsed rr: %s", err.Error()) - t.Logf("unpacked Struct: %V", rr) + t.Logf("unpacked Struct: %#v", rr) t.Logf(" string: %v", rrString) - t.Logf(" parsed Struct: %V", rr2) + t.Logf(" parsed Struct: %#v", rr2) return false } buf = buf[:off] if !bytes.Equal(buf, rrbytes) { t.Logf("parsed packed bytes don't match original bytes") t.Logf(" source bytes: %v", rrbytes) - t.Logf("unpacked struct: %V", rr) + t.Logf("unpacked struct: %#v", rr) t.Logf(" string: %v", rrString) - t.Logf(" parsed struct: %V", rr2) + t.Logf(" parsed struct: %#v", rr2) t.Logf(" repacked bytes: %v", buf) return false } @@ -683,17 +683,17 @@ b1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D t.Fatalf("failed to unpack msg: %s", err) } if len(msg.Answer) != 2 { - t.Fatalf("2 answers expected: %V", msg) + t.Fatalf("2 answers expected: %#v", msg) } for i, rr := range msg.Answer { rr := rr.(*HIP) t.Logf("RR: %s", rr) if l := len(rr.RendezvousServers); l != 2 { - t.Fatalf("2 servers expected, only %d in record %d:\n%V", l, i, msg) + t.Fatalf("2 servers expected, only %d in record %d:\n%#v", l, i, msg) } for j, s := range []string{"rvs1.example.com.", "rvs2.example.com."} { if rr.RendezvousServers[j] != s { - t.Fatalf("expected server %d of record %d to be %s:\n%V", j, i, s, msg) + t.Fatalf("expected server %d of record %d to be %s:\n%#v", j, i, s, msg) } } } diff --git a/pkg/kit/lockfile/lockfile_test.go b/pkg/kit/lockfile/lockfile_test.go index 2a99cd1..9ea28f9 100644 --- a/pkg/kit/lockfile/lockfile_test.go +++ b/pkg/kit/lockfile/lockfile_test.go @@ -19,7 +19,7 @@ func TestLockFile(t *testing.T) { } if _, err := Create(name); err == nil { - t.Errorf("re-create lock should not succceed", err) + t.Error("re-create lock should not succceed", err) } if err = lock.Release(); err != nil { diff --git a/pkg/kit/pubsub/lossyring_test.go b/pkg/kit/pubsub/lossyring_test.go index b6ca7a1..08887d9 100644 --- a/pkg/kit/pubsub/lossyring_test.go +++ b/pkg/kit/pubsub/lossyring_test.go @@ -21,7 +21,7 @@ func TestLossyRing(t *testing.T) { t.Fatalf("x") } if r.Len() != 2 { - t.Fatalf("len", r.Len()) + t.Fatal("len", r.Len()) } if !r.Send(3) { t.Fatalf("x") diff --git a/pkg/kit/xor/xor.go b/pkg/kit/xor/xor.go index 10e4c14..e8b50f0 100644 --- a/pkg/kit/xor/xor.go +++ b/pkg/kit/xor/xor.go @@ -30,13 +30,14 @@ func (id Key) Bit(k int) int { // String returns a textual representation of the id func (id Key) String() string { - return fmt.Sprintf("%016x", id) + return strconv.FormatUint(uint64(id), 16) } // String returns a textual representation of the id, truncated to the k MSBs. func (id Key) ShortString(k uint) string { shift := uint(8*unsafe.Sizeof(id)) - k - return fmt.Sprintf("%0"+strconv.Itoa(int(k))+"b", ((id << shift) >> shift)) + return fmt.Sprintf("%0"+strconv.Itoa(int(k))+"b", + strconv.FormatUint(uint64((id<>shift), 16)) } // Point is any type that has an XOR-space Key From 9fee2e2f5739f47baa07e9e3002881eb95bf9510 Mon Sep 17 00:00:00 2001 From: hoijui Date: Sun, 3 May 2020 12:09:06 +0200 Subject: [PATCH 18/28] update git ignores --- .gitignore | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index d0936b6..cf63f58 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ -.hg -.vagrant -bin +/bin/ +/public/ From 4f32bd1f016353b2ed36a5ee236457ebb1bed958 Mon Sep 17 00:00:00 2001 From: hoijui Date: Sun, 3 May 2020 12:09:56 +0200 Subject: [PATCH 19/28] CI: use GitHub actions instead of Travis-CI --- .github/workflows/build-test.yml | 58 ++++++++++++++++++++++++++++++ .github/workflows/deploy-pages.yml | 53 +++++++++++++++++++++++++++ .travis.yml | 21 ----------- 3 files changed, 111 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/build-test.yml create mode 100644 .github/workflows/deploy-pages.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml new file mode 100644 index 0000000..3e3fea8 --- /dev/null +++ b/.github/workflows/build-test.yml @@ -0,0 +1,58 @@ +name: Build & Test + +on: [push, pull_request] + +jobs: + + build: + name: Build, Test & Run Tutorials + env: + MAIN_SRC_DIR: ./cmd/circuit/ + runs-on: ubuntu-latest + steps: + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ^1.13.1 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Get Go dependencies + run: go get -v -t -d ./... + + - name: Create the bin directory (will ocntain the built binaries) + run: mkdir -p bin + + - name: Build from Go sources + run: go build -v -o bin/circuit "$MAIN_SRC_DIR" + + - name: Install the main executable into PATH + run: go install -v "$MAIN_SRC_DIR" + + - name: Run Go Tests + run: go test ./... + + - name: Build the Tutorials + run: | + go build -v -o bin/tutorial-nodejs-using-mysql ./tutorial/nodejs-using-mysql/start-app/ + go build -v -o bin/tutorial-wait-all ./tutorial/wait-all/ + go build -v -o bin/tutorial-wait-first ./tutorial/wait-first/ + go build -v -o bin/tutorial-watchbot ./tutorial/watchbot/ + go build -v -o bin/tutorial-watchbot-with-chan ./tutorial/watchbot-with-chan/ + go build -v -o bin/tutorial-mysql-nodejs ./gocircuit.org/tutorial/mysql-nodejs/ + + - name: Run the Tutorials + run: | + bin/tutorial-* + + - name: Run GoLang-CI Linter + run: | + # install it into ./bin/ + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.25.1 + # NOTE the " || true" chould possibly be removed from the below, once we reach 0 warnings + # NOTE " --enable-all" chould possibly be added to the below, to get more warnings + ./bin/golangci-lint run || true + diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml new file mode 100644 index 0000000..02bdcb0 --- /dev/null +++ b/.github/workflows/deploy-pages.yml @@ -0,0 +1,53 @@ +name: Deploy Pages + +on: + push: + branches: [ master ] + paths: + - 'src/handbook/**' + +jobs: + + build: + name: Build & Deploy Pages + env: + MAIN_SRC_DIR: ./cmd/circuit/ + runs-on: ubuntu-latest + steps: + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ^1.13.1 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Get Go dependencies + run: go get -v -t -d ./... + + - name: Create the bin directory (will ocntain the built binaries) + run: mkdir -p bin + + - name: Build from Go sources + run: go build -v -o bin/circuit "$MAIN_SRC_DIR" + + - name: Install the main executable into PATH + run: go install -v "$MAIN_SRC_DIR" + + - name: Build the homepage + run: | + go build -v -o bin/build-homepage ./gocircuit.org/build + mkdir -p public + cd public + cp -r ../gocircuit.org/build/* ./ + ../bin/build-homepage + cd .. + + - name: Deploy to the gh-pages branch + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./public + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 31c2490..0000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: go -sudo: false - -# Allow use in forks -go_import_path: github.com/hoijui/circuit - -matrix: - include: - - go: 1.12.x - os: linux - - go: 1.11.x - os: osx - - name: Cross-Compile for windows (from Linux) - go: 1.11.x - os: linux - env: GOOS=windows GOARCH=amd64 CGO_ENABLED=0 - -install: -- go get -v github.com/pkg/errors -- go get -v github.com/urfave/cli - From d63834d3cf776709bea63a34568ca1fa8f320b42 Mon Sep 17 00:00:00 2001 From: hoijui Date: Sun, 3 May 2020 12:33:42 +0200 Subject: [PATCH 20/28] remove copied-in dependencies, and rely on the module systems deps --- github.com/docopt/docopt/.gitignore | 25 - github.com/docopt/docopt/.travis.yml | 29 - github.com/docopt/docopt/LICENSE | 20 - github.com/docopt/docopt/README.md | 88 - .../docopt/_examples/arguments_example.go | 29 - .../docopt/_examples/calculator_example.go | 26 - .../docopt/_examples/config_file_example.go | 76 - .../docopt/_examples/counted_example.go | 22 - github.com/docopt/docopt/_examples/git/git.go | 84 - .../docopt/docopt/_examples/git/git_add.go | 30 - .../docopt/docopt/_examples/git/git_branch.go | 38 - .../docopt/_examples/git/git_checkout.go | 30 - .../docopt/docopt/_examples/git/git_clone.go | 37 - .../docopt/docopt/_examples/git/git_push.go | 34 - .../docopt/docopt/_examples/git/git_remote.go | 28 - .../docopt/docopt/_examples/naval_fate.go | 28 - .../docopt/_examples/odd_even_example.go | 19 - .../docopt/_examples/options_example.go | 43 - .../_examples/options_shortcut_example.go | 24 - .../docopt/docopt/_examples/quick_example.go | 16 - .../docopt/_examples/type_assert_example.go | 31 - github.com/docopt/docopt/docopt.go | 1239 --------- github.com/docopt/docopt/docopt_test.go | 1536 ----------- github.com/docopt/docopt/example_test.go | 37 - github.com/docopt/docopt/test_golang.docopt | 9 - github.com/docopt/docopt/testcases.docopt | 957 ------- github.com/miekg/dns/.gitignore | 5 - github.com/miekg/dns/.travis.yml | 19 - github.com/miekg/dns/AUTHORS | 1 - github.com/miekg/dns/CONTRIBUTORS | 8 - github.com/miekg/dns/COPYRIGHT | 9 - github.com/miekg/dns/LICENSE | 32 - github.com/miekg/dns/README.md | 138 - github.com/miekg/dns/client.go | 319 --- github.com/miekg/dns/client_test.go | 195 -- github.com/miekg/dns/clientconfig.go | 94 - github.com/miekg/dns/defaults.go | 242 -- github.com/miekg/dns/dns.go | 193 -- github.com/miekg/dns/dns_test.go | 501 ---- github.com/miekg/dns/dnssec.go | 739 ------ github.com/miekg/dns/dnssec_test.go | 646 ----- github.com/miekg/dns/dyn_test.go | 3 - github.com/miekg/dns/edns.go | 496 ---- github.com/miekg/dns/example_test.go | 53 - github.com/miekg/dns/keygen.go | 149 -- github.com/miekg/dns/kscan.go | 244 -- github.com/miekg/dns/labels.go | 160 -- github.com/miekg/dns/labels_test.go | 214 -- github.com/miekg/dns/msg.go | 1840 -------------- github.com/miekg/dns/nsecx.go | 110 - github.com/miekg/dns/nsecx_test.go | 33 - github.com/miekg/dns/parse_test.db | 2 - github.com/miekg/dns/parse_test.go | 1284 ---------- github.com/miekg/dns/rawmsg.go | 95 - github.com/miekg/dns/scanner.go | 43 - github.com/miekg/dns/server.go | 612 ----- github.com/miekg/dns/server_test.go | 331 --- github.com/miekg/dns/singleinflight.go | 57 - github.com/miekg/dns/tlsa.go | 84 - github.com/miekg/dns/tsig.go | 371 --- github.com/miekg/dns/types.go | 1644 ------------ github.com/miekg/dns/udp.go | 55 - github.com/miekg/dns/udp_linux.go | 63 - github.com/miekg/dns/udp_other.go | 17 - github.com/miekg/dns/udp_windows.go | 34 - github.com/miekg/dns/update.go | 132 - github.com/miekg/dns/xfr.go | 236 -- github.com/miekg/dns/zgenerate.go | 157 -- github.com/miekg/dns/zscan.go | 956 ------- github.com/miekg/dns/zscan_rr.go | 2260 ----------------- go.mod | 1 + go.sum | 7 + pkg/element/dns/dns.go | 2 +- 73 files changed, 9 insertions(+), 19412 deletions(-) delete mode 100644 github.com/docopt/docopt/.gitignore delete mode 100644 github.com/docopt/docopt/.travis.yml delete mode 100644 github.com/docopt/docopt/LICENSE delete mode 100644 github.com/docopt/docopt/README.md delete mode 100644 github.com/docopt/docopt/_examples/arguments_example.go delete mode 100644 github.com/docopt/docopt/_examples/calculator_example.go delete mode 100644 github.com/docopt/docopt/_examples/config_file_example.go delete mode 100644 github.com/docopt/docopt/_examples/counted_example.go delete mode 100644 github.com/docopt/docopt/_examples/git/git.go delete mode 100644 github.com/docopt/docopt/_examples/git/git_add.go delete mode 100644 github.com/docopt/docopt/_examples/git/git_branch.go delete mode 100644 github.com/docopt/docopt/_examples/git/git_checkout.go delete mode 100644 github.com/docopt/docopt/_examples/git/git_clone.go delete mode 100644 github.com/docopt/docopt/_examples/git/git_push.go delete mode 100644 github.com/docopt/docopt/_examples/git/git_remote.go delete mode 100644 github.com/docopt/docopt/_examples/naval_fate.go delete mode 100644 github.com/docopt/docopt/_examples/odd_even_example.go delete mode 100644 github.com/docopt/docopt/_examples/options_example.go delete mode 100644 github.com/docopt/docopt/_examples/options_shortcut_example.go delete mode 100644 github.com/docopt/docopt/_examples/quick_example.go delete mode 100644 github.com/docopt/docopt/_examples/type_assert_example.go delete mode 100644 github.com/docopt/docopt/docopt.go delete mode 100644 github.com/docopt/docopt/docopt_test.go delete mode 100644 github.com/docopt/docopt/example_test.go delete mode 100644 github.com/docopt/docopt/test_golang.docopt delete mode 100644 github.com/docopt/docopt/testcases.docopt delete mode 100644 github.com/miekg/dns/.gitignore delete mode 100644 github.com/miekg/dns/.travis.yml delete mode 100644 github.com/miekg/dns/AUTHORS delete mode 100644 github.com/miekg/dns/CONTRIBUTORS delete mode 100644 github.com/miekg/dns/COPYRIGHT delete mode 100644 github.com/miekg/dns/LICENSE delete mode 100644 github.com/miekg/dns/README.md delete mode 100644 github.com/miekg/dns/client.go delete mode 100644 github.com/miekg/dns/client_test.go delete mode 100644 github.com/miekg/dns/clientconfig.go delete mode 100644 github.com/miekg/dns/defaults.go delete mode 100644 github.com/miekg/dns/dns.go delete mode 100644 github.com/miekg/dns/dns_test.go delete mode 100644 github.com/miekg/dns/dnssec.go delete mode 100644 github.com/miekg/dns/dnssec_test.go delete mode 100644 github.com/miekg/dns/dyn_test.go delete mode 100644 github.com/miekg/dns/edns.go delete mode 100644 github.com/miekg/dns/example_test.go delete mode 100644 github.com/miekg/dns/keygen.go delete mode 100644 github.com/miekg/dns/kscan.go delete mode 100644 github.com/miekg/dns/labels.go delete mode 100644 github.com/miekg/dns/labels_test.go delete mode 100644 github.com/miekg/dns/msg.go delete mode 100644 github.com/miekg/dns/nsecx.go delete mode 100644 github.com/miekg/dns/nsecx_test.go delete mode 100644 github.com/miekg/dns/parse_test.db delete mode 100644 github.com/miekg/dns/parse_test.go delete mode 100644 github.com/miekg/dns/rawmsg.go delete mode 100644 github.com/miekg/dns/scanner.go delete mode 100644 github.com/miekg/dns/server.go delete mode 100644 github.com/miekg/dns/server_test.go delete mode 100644 github.com/miekg/dns/singleinflight.go delete mode 100644 github.com/miekg/dns/tlsa.go delete mode 100644 github.com/miekg/dns/tsig.go delete mode 100644 github.com/miekg/dns/types.go delete mode 100644 github.com/miekg/dns/udp.go delete mode 100644 github.com/miekg/dns/udp_linux.go delete mode 100644 github.com/miekg/dns/udp_other.go delete mode 100644 github.com/miekg/dns/udp_windows.go delete mode 100644 github.com/miekg/dns/update.go delete mode 100644 github.com/miekg/dns/xfr.go delete mode 100644 github.com/miekg/dns/zgenerate.go delete mode 100644 github.com/miekg/dns/zscan.go delete mode 100644 github.com/miekg/dns/zscan_rr.go diff --git a/github.com/docopt/docopt/.gitignore b/github.com/docopt/docopt/.gitignore deleted file mode 100644 index 49ad16c..0000000 --- a/github.com/docopt/docopt/.gitignore +++ /dev/null @@ -1,25 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe - -# coverage droppings -profile.cov diff --git a/github.com/docopt/docopt/.travis.yml b/github.com/docopt/docopt/.travis.yml deleted file mode 100644 index 494f449..0000000 --- a/github.com/docopt/docopt/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -# Travis CI (http://travis-ci.org/) is a continuous integration -# service for open source projects. This file configures it -# to run unit tests for docopt-go. - -language: go - -go: - - 1.2.2 - - tip - -matrix: - fast_finish: true - -before_install: - - go get code.google.com/p/go.tools/cmd/vet - - go get -v github.com/golang/lint/golint - - go get -v code.google.com/p/go.tools/cmd/cover - - go get -v github.com/mattn/goveralls - -install: - - go get -d -v ./... && go build -v . - -script: - - go vet -x ./... - - $HOME/gopath/bin/golint . - - go test -covermode=count -coverprofile=profile.cov -v . - -after_script: - - $HOME/gopath/bin/goveralls -coverprofile=profile.cov -service=travis-ci diff --git a/github.com/docopt/docopt/LICENSE b/github.com/docopt/docopt/LICENSE deleted file mode 100644 index 8841af1..0000000 --- a/github.com/docopt/docopt/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Keith Batten - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/github.com/docopt/docopt/README.md b/github.com/docopt/docopt/README.md deleted file mode 100644 index 71c92aa..0000000 --- a/github.com/docopt/docopt/README.md +++ /dev/null @@ -1,88 +0,0 @@ -docopt-go -========= - -[![Build Status](https://travis-ci.org/docopt/docopt.go.svg?branch=master)](https://travis-ci.org/docopt/docopt.go) -[![Coverage Status](https://coveralls.io/repos/docopt/docopt.go/badge.png)](https://coveralls.io/r/docopt/docopt.go) -[![GoDoc](https://godoc.org/github.com/docopt/docopt.go?status.png)](https://godoc.org/github.com/docopt/docopt.go) - -An implementation of [docopt](http://docopt.org/) in the -[Go](http://golang.org/) programming language. - -**docopt** helps you create *beautiful* command-line interfaces easily: - -```go -package main - -import ( - "fmt" - "github.com/docopt/docopt-go" -) - -func main() { - usage := `Naval Fate. - -Usage: - naval_fate ship new ... - naval_fate ship move [--speed=] - naval_fate ship shoot - naval_fate mine (set|remove) [--moored|--drifting] - naval_fate -h | --help - naval_fate --version - -Options: - -h --help Show this screen. - --version Show version. - --speed= Speed in knots [default: 10]. - --moored Moored (anchored) mine. - --drifting Drifting mine.` - - arguments, _ := docopt.Parse(usage, nil, true, "Naval Fate 2.0", false) - fmt.Println(arguments) -} -``` - -**docopt** parses command-line arguments based on a help message. Don't -write parser code: a good help message already has all the necessary -information in it. - -## Installation - -⚠ Use the alias “docopt-go”. To use docopt in your Go code: - -```go -import "github.com/docopt/docopt-go" -``` - -To install docopt according to your `$GOPATH`: - -```console -$ go get github.com/docopt/docopt-go -``` - -## API - -```go -func Parse(doc string, argv []string, help bool, version string, - optionsFirst bool, exit ...bool) (map[string]interface{}, error) -``` -Parse `argv` based on the command-line interface described in `doc`. - -Given a conventional command-line help message, docopt creates a parser and -processes the arguments. See -https://github.com/docopt/docopt#help-message-format for a description of the -help message format. If `argv` is `nil`, `os.Args[1:]` is used. - -docopt returns a map of option names to the values parsed from `argv`, and an -error or `nil`. - -More documentation for docopt is available at -[GoDoc.org](https://godoc.org/github.com/docopt/docopt.go). - -## Testing - -All tests from the Python version are implemented and passing -at [Travis CI](https://travis-ci.org/docopt/docopt.go). New -language-agnostic tests have been added -to [test_golang.docopt](test_golang.docopt). - -To run tests for docopt-go, use `go test`. diff --git a/github.com/docopt/docopt/_examples/arguments_example.go b/github.com/docopt/docopt/_examples/arguments_example.go deleted file mode 100644 index 7555b99..0000000 --- a/github.com/docopt/docopt/_examples/arguments_example.go +++ /dev/null @@ -1,29 +0,0 @@ -package main - -import ( - "fmt" - "github.com/docopt/docopt-go" -) - -func main() { - usage := `Usage: arguments_example [-vqrh] [FILE] ... - arguments_example (--left | --right) CORRECTION FILE - -Process FILE and optionally apply correction to either left-hand side or -right-hand side. - -Arguments: - FILE optional input file - CORRECTION correction angle, needs FILE, --left or --right to be present - -Options: - -h --help - -v verbose mode - -q quiet mode - -r make report - --left use left-hand side - --right use right-hand side` - - arguments, _ := docopt.Parse(usage, nil, true, "", false) - fmt.Println(arguments) -} diff --git a/github.com/docopt/docopt/_examples/calculator_example.go b/github.com/docopt/docopt/_examples/calculator_example.go deleted file mode 100644 index 26c3b32..0000000 --- a/github.com/docopt/docopt/_examples/calculator_example.go +++ /dev/null @@ -1,26 +0,0 @@ -package main - -import ( - "fmt" - "github.com/docopt/docopt-go" -) - -func main() { - usage := `Not a serious example. - -Usage: - calculator_example ( ( + | - | * | / ) )... - calculator_example [( , )]... - calculator_example (-h | --help) - -Examples: - calculator_example 1 + 2 + 3 + 4 + 5 - calculator_example 1 + 2 '*' 3 / 4 - 5 # note quotes around '*' - calculator_example sum 10 , 20 , 30 , 40 - -Options: - -h, --help -` - arguments, _ := docopt.Parse(usage, nil, true, "", false) - fmt.Println(arguments) -} diff --git a/github.com/docopt/docopt/_examples/config_file_example.go b/github.com/docopt/docopt/_examples/config_file_example.go deleted file mode 100644 index b0b1c18..0000000 --- a/github.com/docopt/docopt/_examples/config_file_example.go +++ /dev/null @@ -1,76 +0,0 @@ -package main - -import ( - "encoding/json" - "fmt" - "github.com/docopt/docopt-go" - "strings" -) - -func loadJSONConfig() map[string]interface{} { - var result map[string]interface{} - jsonData := []byte(`{"--force": true, "--timeout": "10", "--baud": "9600"}`) - json.Unmarshal(jsonData, &result) - return result -} - -func loadIniConfig() map[string]interface{} { - iniData := ` -[default-arguments] ---force ---baud=19200 -=localhost` - // trivial ini parser - // default value for an item is bool: true (for --force) - // otherwise the value is a string - iniParsed := make(map[string]map[string]interface{}) - var section string - for _, line := range strings.Split(iniData, "\n") { - if strings.HasPrefix(line, "[") { - section = line - iniParsed[section] = make(map[string]interface{}) - } else if section != "" { - kv := strings.SplitN(line, "=", 2) - if len(kv) == 1 { - iniParsed[section][kv[0]] = true - } else if len(kv) == 2 { - iniParsed[section][kv[0]] = kv[1] - } - } - } - return iniParsed["[default-arguments]"] -} - -// merge combines two maps. -// truthiness takes priority over falsiness -// mapA takes priority over mapB -func merge(mapA, mapB map[string]interface{}) map[string]interface{} { - result := make(map[string]interface{}) - for k, v := range mapA { - result[k] = v - } - for k, v := range mapB { - if _, ok := result[k]; !ok || result[k] == nil || result[k] == false { - result[k] = v - } - } - return result -} - -func main() { - usage := `Usage: - config_file_example tcp [] [--force] [--timeout=] - config_file_example serial [--baud=] [--timeout=] - config_file_example -h | --help | --version` - - jsonConfig := loadJSONConfig() - iniConfig := loadIniConfig() - arguments, _ := docopt.Parse(usage, nil, true, "0.1.1rc", false) - - // Arguments take priority over INI, INI takes priority over JSON - result := merge(arguments, merge(iniConfig, jsonConfig)) - - fmt.Println("JSON config: ", jsonConfig) - fmt.Println("INI config: ", iniConfig) - fmt.Println("Result: ", result) -} diff --git a/github.com/docopt/docopt/_examples/counted_example.go b/github.com/docopt/docopt/_examples/counted_example.go deleted file mode 100644 index c1da06f..0000000 --- a/github.com/docopt/docopt/_examples/counted_example.go +++ /dev/null @@ -1,22 +0,0 @@ -package main - -import ( - "fmt" - "github.com/docopt/docopt-go" -) - -func main() { - usage := `Usage: counted_example --help - counted_example -v... - counted_example go [go] - counted_example (--path=)... - counted_example - -Try: counted_example -vvvvvvvvvv - counted_example go go - counted_example --path ./here --path ./there - counted_example this.txt that.txt` - - arguments, _ := docopt.Parse(usage, nil, true, "", false) - fmt.Println(arguments) -} diff --git a/github.com/docopt/docopt/_examples/git/git.go b/github.com/docopt/docopt/_examples/git/git.go deleted file mode 100644 index 05c7f8b..0000000 --- a/github.com/docopt/docopt/_examples/git/git.go +++ /dev/null @@ -1,84 +0,0 @@ -package main - -import ( - "fmt" - "github.com/docopt/docopt-go" - "os" - "os/exec" -) - -func main() { - usage := `usage: git [--version] [--exec-path=] [--html-path] - [-p|--paginate|--no-pager] [--no-replace-objects] - [--bare] [--git-dir=] [--work-tree=] - [-c =] [--help] - [...] - -options: - -c - -h, --help - -p, --paginate - -The most commonly used git commands are: - add Add file contents to the index - branch List, create, or delete branches - checkout Checkout a branch or paths to the working tree - clone Clone a repository into a new directory - commit Record changes to the repository - push Update remote refs along with associated objects - remote Manage set of tracked repositories - -See 'git help ' for more information on a specific command. -` - args, _ := docopt.Parse(usage, nil, true, "git version 1.7.4.4", true) - - fmt.Println("global arguments:") - fmt.Println(args) - - fmt.Println("command arguments:") - cmd := args[""].(string) - cmdArgs := args[""].([]string) - - err := runCommand(cmd, cmdArgs) - if err != nil { - fmt.Println(err) - os.Exit(1) - } -} - -func goRun(scriptName string, args []string) (err error) { - cmdArgs := make([]string, 2) - cmdArgs[0] = "run" - cmdArgs[1] = scriptName - cmdArgs = append(cmdArgs, args...) - osCmd := exec.Command("go", cmdArgs...) - var out []byte - out, err = osCmd.Output() - fmt.Println(string(out)) - if err != nil { - return - } - return -} - -func runCommand(cmd string, args []string) (err error) { - argv := make([]string, 1) - argv[0] = cmd - argv = append(argv, args...) - switch cmd { - case "add": - // subcommand is a function call - return cmdAdd(argv) - case "branch": - // subcommand is a script - return goRun("git_branch.go", argv) - case "checkout", "clone", "commit", "push", "remote": - // subcommand is a script - scriptName := fmt.Sprintf("git_%s.go", cmd) - return goRun(scriptName, argv) - case "help", "": - return goRun("git.go", []string{"git_add.go", "--help"}) - } - - return fmt.Errorf("%s is not a git command. See 'git help'", cmd) -} diff --git a/github.com/docopt/docopt/_examples/git/git_add.go b/github.com/docopt/docopt/_examples/git/git_add.go deleted file mode 100644 index 31ea98a..0000000 --- a/github.com/docopt/docopt/_examples/git/git_add.go +++ /dev/null @@ -1,30 +0,0 @@ -package main - -import ( - "fmt" - "github.com/docopt/docopt-go" -) - -func cmdAdd(argv []string) (err error) { - usage := `usage: git add [options] [--] [...] - -options: - -h, --help - -n, --dry-run dry run - -v, --verbose be verbose - -i, --interactive interactive picking - -p, --patch select hunks interactively - -e, --edit edit current diff and apply - -f, --force allow adding otherwise ignored files - -u, --update update tracked files - -N, --intent-to-add record only the fact that the path will be added later - -A, --all add all, noticing removal of tracked files - --refresh don't add, only refresh the index - --ignore-errors just skip files which cannot be added because of errors - --ignore-missing check if - even missing - files are ignored in dry run -` - - args, _ := docopt.Parse(usage, nil, true, "", false) - fmt.Println(args) - return -} diff --git a/github.com/docopt/docopt/_examples/git/git_branch.go b/github.com/docopt/docopt/_examples/git/git_branch.go deleted file mode 100644 index 7016849..0000000 --- a/github.com/docopt/docopt/_examples/git/git_branch.go +++ /dev/null @@ -1,38 +0,0 @@ -package main - -import ( - "fmt" - "github.com/docopt/docopt-go" -) - -func main() { - usage := `usage: git branch [options] [-r | -a] [--merged= | --no-merged=] - git branch [options] [-l] [-f] [] - git branch [options] [-r] (-d | -D) - git branch [options] (-m | -M) [] - -Generic options: - -h, --help - -v, --verbose show hash and subject, give twice for upstream branch - -t, --track set up tracking mode (see git-pull(1)) - --set-upstream change upstream info - --color= use colored output - -r act on remote-tracking branches - --contains= print only branches that contain the commit - --abbrev= use digits to display SHA-1s - -Specific git-branch actions: - -a list both remote-tracking and local branches - -d delete fully merged branch - -D delete branch (even if not merged) - -m move/rename a branch and its reflog - -M move/rename a branch, even if target exists - -l create the branch's reflog - -f, --force force creation (when already exists) - --no-merged= print only not merged branches - --merged= print only merged branches -` - - args, _ := docopt.Parse(usage, nil, true, "", false) - fmt.Println(args) -} diff --git a/github.com/docopt/docopt/_examples/git/git_checkout.go b/github.com/docopt/docopt/_examples/git/git_checkout.go deleted file mode 100644 index 8e33773..0000000 --- a/github.com/docopt/docopt/_examples/git/git_checkout.go +++ /dev/null @@ -1,30 +0,0 @@ -package main - -import ( - "fmt" - "github.com/docopt/docopt-go" -) - -func main() { - usage := `usage: git checkout [options] - git checkout [options] -- ... - -options: - -q, --quiet suppress progress reporting - -b create and checkout a new branch - -B create/reset and checkout a branch - -l create reflog for new branch - -t, --track set upstream info for new branch - --orphan - new unparented branch - -2, --ours checkout our version for unmerged files - -3, --theirs checkout their version for unmerged files - -f, --force force checkout (throw away local modifications) - -m, --merge perform a 3-way merge with the new branch - --conflict