Skip to content

Commit

Permalink
Merge branch 'master' into protoc-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Sep 18, 2020
2 parents f5cdb83 + 7dec4d8 commit 4146325
Show file tree
Hide file tree
Showing 29 changed files with 570 additions and 521 deletions.
3 changes: 3 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Code of Conduct

Refer to our [Code of Conduct](https://github.com/tinkerbell/.github/blob/master/CODE_OF_CONDUCT.md)
3 changes: 3 additions & 0 deletions OWNERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#OWNERS

Please see [https://github.com/tinkerbell/.github/blob/master/OWNERS.md](https://github.com/tinkerbell/.github/blob/master/OWNERS.md).
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

[![Build Status](https://cloud.drone.io/api/badges/tinkerbell/tink/status.svg)](https://cloud.drone.io/tinkerbell/tink)
[![codecov](https://codecov.io/gh/tinkerbell/tink/branch/master/graph/badge.svg)](https://codecov.io/gh/tinkerbell/tink)
![](https://img.shields.io/badge/Stability-Experimental-red.svg)

This repository is [Experimental](https://github.com/packethost/standards/blob/master/experimental-statement.md) meaning that it's based on untested ideas or techniques and not yet established or finalized or involves a radically new and innovative style! This means that support is best effort (at best!) and we strongly encourage you to NOT use this in production.

It is comprised of following five major components:

Expand Down
10 changes: 4 additions & 6 deletions cmd/tink-cli/cmd/template/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@ cat /tmp/example.tmpl | tink template create -n example`,
} else {
f, err := os.Open(filePath)
if err != nil {
log.Println(err)
log.Fatal(err)
}
reader = f
}

data := readAll(reader)
if data != nil {
if err := tryParseTemplate(string(data)); err != nil {
log.Println(err)
return
log.Fatal(err)
}
createTemplate(data)
}
Expand All @@ -62,7 +61,7 @@ cat /tmp/example.tmpl | tink template create -n example`,
func readAll(reader io.Reader) []byte {
data, err := ioutil.ReadAll(reader)
if err != nil {
log.Println(err)
log.Fatal(err)
}
return data
}
Expand All @@ -86,8 +85,7 @@ func createTemplate(data []byte) {
req := template.WorkflowTemplate{Name: templateName, Data: string(data)}
res, err := client.TemplateClient.CreateTemplate(context.Background(), &req)
if err != nil {
log.Println(err)
return
log.Fatal(err)
}
fmt.Println("Created Template: ", res.Id)
}
Expand Down
7 changes: 3 additions & 4 deletions cmd/tink-cli/cmd/template/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ func updateTemplate(id string) {
data := readTemplateData()
if data != "" {
if err := tryParseTemplate(data); err != nil {
log.Println(err)
return
log.Fatal(err)
}
req.Data = data
}
Expand All @@ -72,13 +71,13 @@ func updateTemplate(id string) {
func readTemplateData() string {
f, err := os.Open(filePath)
if err != nil {
log.Println(err)
log.Fatal(err)
}
defer f.Close()

data, err := ioutil.ReadAll(f)
if err != nil {
log.Println(err)
log.Fatal(err)
}
return string(data)
}
Expand Down
5 changes: 2 additions & 3 deletions cmd/tink-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ var (
)

func main() {
log, cleanup, err := log.Init("github.com/tinkerbell/tink")
log, err := log.Init("github.com/tinkerbell/tink")

if err != nil {
panic(err)
}
logger = log
defer cleanup()

defer logger.Close()
log.Info("starting version " + version)

ctx, closer := context.WithCancel(context.Background())
Expand Down
Loading

0 comments on commit 4146325

Please sign in to comment.