Canonical path is actually otremblay.com/jkl
Also we use go dep instead of godeps
This commit is contained in:
parent
edc5120921
commit
1458b63287
8 changed files with 110 additions and 42 deletions
37
.circleci/config.yml
Normal file
37
.circleci/config.yml
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# Golang CircleCI 2.0 configuration file
|
||||
#
|
||||
# Check https://circleci.com/docs/2.0/language-go/ for more details
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
docker:
|
||||
# specify the version
|
||||
- image: circleci/golang:1.8
|
||||
|
||||
# Specify service dependencies here if necessary
|
||||
# CircleCI maintains a library of pre-built images
|
||||
# documented at https://circleci.com/docs/2.0/circleci-images/
|
||||
# - image: circleci/postgres:9.4
|
||||
|
||||
#### TEMPLATE_NOTE: go expects specific checkout path representing url
|
||||
#### expecting it in the form of
|
||||
#### /go/src/github.com/circleci/go-tool
|
||||
#### /go/src/bitbucket.org/circleci/go-tool
|
||||
working_directory: /go/src/otremblay.com/jkl
|
||||
steps:
|
||||
- checkout
|
||||
|
||||
# specify any bash command here prefixed with `run: `
|
||||
- run: go get github.com/golang/dep/cmd/dep
|
||||
- run: go vet ./...
|
||||
- run: dep ensure
|
||||
- run:
|
||||
command:
|
||||
go test $(go list ./... | grep -v /vendor/)
|
||||
- run: go install $(go list ./... | grep -v /vendor/)
|
||||
- run:
|
||||
command: |
|
||||
cp /go/bin/jkl /tmp/jkl
|
||||
- store_artifacts:
|
||||
path: /tmp/jkl
|
||||
destination: jkl
|
||||
12
Godeps/Godeps.json
generated
12
Godeps/Godeps.json
generated
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
"ImportPath": "github.com/avanier/jkl",
|
||||
"GoVersion": "go1.8",
|
||||
"GodepVersion": "v79",
|
||||
"Deps": [
|
||||
{
|
||||
"ImportPath": "github.com/joho/godotenv",
|
||||
"Comment": "v1.1-23-gc9360df",
|
||||
"Rev": "c9360df4d16dc0e391ea2f28da2d31a9ede2e26f"
|
||||
}
|
||||
]
|
||||
}
|
||||
5
Godeps/Readme
generated
5
Godeps/Readme
generated
|
|
@ -1,5 +0,0 @@
|
|||
This directory tree is generated automatically by godep.
|
||||
|
||||
Please do not edit.
|
||||
|
||||
See https://github.com/tools/godep for more information.
|
||||
33
Gopkg.lock
generated
Normal file
33
Gopkg.lock
generated
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
|
||||
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/hanwen/go-fuse"
|
||||
packages = ["fuse","fuse/nodefs","fuse/pathfs","splice"]
|
||||
revision = "5690be47d614355a22931c129e1075c25a62e9ac"
|
||||
version = "v20170619"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/joho/godotenv"
|
||||
packages = ["."]
|
||||
revision = "a79fa1e548e2c689c241d10173efd51e5d689d5b"
|
||||
version = "v1.2.0"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "golang.org/x/crypto"
|
||||
packages = ["ssh/terminal"]
|
||||
revision = "541b9d50ad47e36efd8fb423e938e59ff1691f68"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "golang.org/x/sys"
|
||||
packages = ["unix","windows"]
|
||||
revision = "8dbc5d05d6edcc104950cc299a1ce6641235bc86"
|
||||
|
||||
[solve-meta]
|
||||
analyzer-name = "dep"
|
||||
analyzer-version = 1
|
||||
inputs-digest = "e645477fd4358a3de6784ff29e9a1c0f3e3f12379ce0600519ab4e19de48c88a"
|
||||
solver-name = "gps-cdcl"
|
||||
solver-version = 1
|
||||
34
Gopkg.toml
Normal file
34
Gopkg.toml
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
|
||||
# Gopkg.toml example
|
||||
#
|
||||
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
|
||||
# for detailed Gopkg.toml documentation.
|
||||
#
|
||||
# required = ["github.com/user/thing/cmd/thing"]
|
||||
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
|
||||
#
|
||||
# [[constraint]]
|
||||
# name = "github.com/user/project"
|
||||
# version = "1.0.0"
|
||||
#
|
||||
# [[constraint]]
|
||||
# name = "github.com/user/project2"
|
||||
# branch = "dev"
|
||||
# source = "github.com/myfork/project2"
|
||||
#
|
||||
# [[override]]
|
||||
# name = "github.com/x/y"
|
||||
# version = "2.4.0"
|
||||
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/hanwen/go-fuse"
|
||||
version = "20170619.0.0"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/joho/godotenv"
|
||||
version = "1.2.0"
|
||||
|
||||
[[constraint]]
|
||||
branch = "master"
|
||||
name = "golang.org/x/crypto"
|
||||
|
|
@ -12,7 +12,7 @@ hell
|
|||
Issue Type: Sometype
|
||||
this is ignored
|
||||
Summary: Dookienator
|
||||
also ignored`, "\n"))
|
||||
also ignored`, "\n"), nil)
|
||||
AssertEqual(t, `Cowboys
|
||||
from
|
||||
hell`, iss.Fields.Description)
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ func (f *jklfile) String() string {
|
|||
func (f *jklfile) Write(data []byte, off int64) (uint32, fuse.Status) {
|
||||
n, err := f.File.WriteAt(data, off)
|
||||
if err != nil {
|
||||
return uint32(0),fuse.EACCES
|
||||
return uint32(0), fuse.EACCES
|
||||
}
|
||||
return uint32(n), fuse.OK
|
||||
}
|
||||
|
|
@ -76,3 +76,7 @@ func (f *jklfile) SetInode(i *nodefs.Inode) {}
|
|||
func (f *jklfile) Utimens(atime *time.Time, mtime *time.Time) fuse.Status {
|
||||
return fuse.EPERM
|
||||
}
|
||||
|
||||
func (f *jklfile) Flock(flags int) fuse.Status {
|
||||
return fuse.ENOSYS
|
||||
}
|
||||
|
|
|
|||
23
jkl_test.go
23
jkl_test.go
|
|
@ -1,34 +1,11 @@
|
|||
package jkl
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
"testing"
|
||||
"text/template"
|
||||
)
|
||||
|
||||
func TestUnmarshalProjects(t *testing.T) {
|
||||
f, err := os.Open("projects.json")
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
dec := json.NewDecoder(f)
|
||||
x := struct{ Projects []Project }{}
|
||||
|
||||
err = dec.Decode(&x)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
for _, p := range x.Projects {
|
||||
for _, it := range p.IssueTypes {
|
||||
for sn, f := range it.Fields {
|
||||
fmt.Println(it.Name, sn, f.Name, f.Required, f.Schema.Type)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type TestType struct {
|
||||
Field string
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue