[lxc-devel] [go-lxc/v2] update README.md with links and examples

caglar10ur on Github lxc-bot at linuxcontainers.org
Thu Dec 27 22:51:35 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 351 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20181227/345065b8/attachment.bin>
-------------- next part --------------
From 97f1472a250168a5d63c3ee2ff8ad5806a01fc10 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= <caglar at 10ur.org>
Date: Thu, 27 Dec 2018 14:46:27 -0800
Subject: [PATCH] update README.md with links and examples
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: S.Çağlar Onur <caglar at 10ur.org>
---
 README.md         | 97 ++++++++++++++++++++++++++++++++++++++++++-----
 examples/Makefile |  4 +-
 2 files changed, 90 insertions(+), 11 deletions(-)

diff --git a/README.md b/README.md
index d737fa7..13cad24 100644
--- a/README.md
+++ b/README.md
@@ -1,40 +1,119 @@
+[![go-lxc](https://linuxcontainers.org/static/img/containers.png)](https://linuxcontainers.org/)
 # Go Bindings for LXC (Linux Containers)
 
-This package implements [Go](http://golang.org) bindings for the [LXC](http://linuxcontainers.org/) C API (liblxc).
+LXC is the well-known and heavily tested low-level Linux container runtime. It
+is in active development since 2008 and has proven itself in critical
+production environments world-wide. Some of its core contributors are the same
+people that helped to implement various well-known containerization features
+inside the Linux kernel.
+
+
+This package implements [Go](https://golang.org) bindings for the [LXC](https://linuxcontainers.org/lxc/introduction/) C API (liblxc).
+
+## Status
+Type            | Service               | Status
+---             | ---                   | ---
+CI (Linux)      | Travis                | [![Build Status](https://travis-ci.org/lxc/go-lxc.svg?branch=v2)](https://travis-ci.org/lxc/go-lxc/)
+Go documentation    | Godoc                 | [![GoDoc](https://godoc.org/gopkg.in/lxc/go-lxc.v2?status.svg)](https://godoc.org/gopkg.in/lxc/go-lxc.v2)
+Static analysis     | GoReport              | [![Go Report Card](https://goreportcard.com/badge/gopkg.in/lxc/go-lxc.v2)](https://goreportcard.com/report/gopkg.in/lxc/go-lxc.v2)
 
 ## Requirements
 
-This package requires [LXC 1.x](https://github.com/lxc/lxc/releases) and its development package to be installed. Works with [Go 1.x](http://golang.org/dl). Following command should install required dependencies on Ubuntu:
+This package requires [LXC >= 1.0.0](https://github.com/lxc/lxc/releases) and its development package and their dependencies to be installed. Additionally, go-lxc requires Golang 1.10 or later to work. Following command should install required dependencies on Ubuntu 18.10:
 
-	apt-get install -y pkg-config lxc-dev
+```bash
+sudo apt update
+sudo apt install git golang gcc make liblxc1 liblxc-dev lxc-utils pkg-config
+```
 
 ## Installing
 
 To install it, run:
 
-    go get gopkg.in/lxc/go-lxc.v2
+```bash
+go get gopkg.in/lxc/go-lxc.v2
+```
+
+## Trying
+
+To try examples, run:
+
+```bash
+# cd ~/go/src/gopkg.in/lxc/go-lxc.v2/examples/
 
-## Documentation
+# make
+==> Running go vet 
+==> Building ...
+...
 
-Documentation can be found at [GoDoc](http://godoc.org/gopkg.in/lxc/go-lxc.v2).
+# create/create
+2018/12/27 22:39:27 Creating container...
+
+# start/start 
+2018/12/27 22:39:39 Starting the container...
+2018/12/27 22:39:39 Waiting container to startup networking...
+
+# attach/attach 
+2018/12/27 22:39:46 AttachShell
+root at rubik:/# hostname
+rubik
+root at rubik:/# exit
+exit
+2018/12/27 22:39:52 RunCommand
+uid=0(root) gid=0(root) groups=0(root)
+
+# stop/stop 
+2018/12/27 22:39:54 Stopping the container...
+
+# destroy/destroy 
+2018/12/27 22:39:57 Destroying container...
+```
 
 ## Stability
 
 The package API will remain stable as described in [gopkg.in](https://gopkg.in).
 
+## Backwards Compatibility
+
+LXC has always focused on strong backwards compatibility. In fact, the API hasn't been broken from release `1.0.0` onwards. Main LXC is currently at version `2.*.*`.
+
 ## Examples
 
 See the [examples](https://github.com/lxc/go-lxc/tree/v2/examples) directory for some.
 
+## Bug reports
+
+Bug reports can be filed at: <https://github.com/lxc/go-lxc/issues/new>
+
 ## Contributing
 
-We'd love to see go-lxc improve. To contribute to go-lxc;
+Fixes and new features are greatly appreciated. We'd love to see go-lxc improve. To contribute to go-lxc;
 
 * **Fork** the repository
 * **Modify** your fork
 * Ensure your fork **passes all tests**
 * **Send** a pull request
 	* Bonus points if the pull request includes *what* you changed, *why* you changed it, and *tests* attached.
-	* For the love of all that is holy, please use `go fmt` *before* you send the pull request.
 
-We'll review it and merge it in if it's appropriate.
+## Getting help
+
+When you find you need help, the LXC projects provides you with several options.
+
+### Discuss Forum
+
+We maintain an discuss forum at
+
+- https://discuss.linuxcontainers.org/
+
+where you can get support.
+
+### IRC
+
+You can find support by joining `#lxcontainers` on `Freenode`.
+
+### Mailing Lists
+
+You can check out one of the two LXC mailing list archives and register if interested:
+
+- http://lists.linuxcontainers.org/listinfo/lxc-devel
+- http://lists.linuxcontainers.org/listinfo/lxc-users
\ No newline at end of file
diff --git a/examples/Makefile b/examples/Makefile
index 8f501e1..9d4c8cc 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -7,7 +7,7 @@ ALL_BIN_FILES = $(patsubst %.go,%,$(ALL_GO_FILES))
 all: $(ALL_GO_FILES)
 
 define PROGRAM_template
-$(1): format vet lint
+$(1): vet
 	@echo "$(OK_COLOR)==> Building $(1) $(NO_COLOR)"
 	@cd $(dir $1); go build
 endef
@@ -24,7 +24,7 @@ format:
 
 vet:
 	@echo "$(OK_COLOR)==> Running go vet $(NO_COLOR)"
-	@$(foreach file,$(ALL_GO_FILES),go vet $(file);)
+	@$(foreach file,$(ALL_GO_FILES),go tool vet -all $(file);)
 
 lint:
 	@echo "$(OK_COLOR)==> Running golint $(NO_COLOR)"


More information about the lxc-devel mailing list