Skip to content

Commit

Permalink
Merge pull request #17 from spiegel-im-spiegel/update-packages
Browse files Browse the repository at this point in the history
Update packages
  • Loading branch information
spiegel-im-spiegel authored Oct 29, 2019
2 parents 07781e7 + 5208293 commit 33de38a
Show file tree
Hide file tree
Showing 18 changed files with 95 additions and 275 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@
# Other folders and files
vendor/
dist/
go.sum
5 changes: 2 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ builds:
- "386"
- arm
- arm64
goarm:
- "6"
main: ./cli/mklink/
ldflags: -s -w -X github.com/spiegel-im-spiegel/mklink/cli/mklink/facade.Version=v{{ .Version }}
binary: mklink

archive:
archives:
-
format: tar.gz
format_overrides:
- goos: windows
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: go

go:
- "1.12.x"
- "1.13.x"

env:
global:
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

See [go.mod](https://github.com/spiegel-im-spiegel/mklink/blob/master/go.mod) file.

![mklink](./mklink.png)

## Usage

```go
Expand Down
12 changes: 6 additions & 6 deletions cli/mklink/facade/facade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestStyleMarkdown(t *testing.T) {
outBuf := new(bytes.Buffer)
outErrBuf := new(bytes.Buffer)
ui := rwi.New(rwi.WithWriter(outBuf), rwi.WithErrorWriter(outErrBuf))
args := []string{"http://text.baldanders.info"}
args := []string{"https://text.baldanders.info"}

exit := Execute(ui, args)
if exit != exitcode.Normal {
Expand All @@ -37,7 +37,7 @@ func TestStyleMarkdown(t *testing.T) {
t.Errorf("Execute(markdown) = \"%v\", want \"%v\".", str, "")
}
str = outBuf.String()
res := "[text.Baldanders.info](http://text.baldanders.info)\n"
res := "[text.Baldanders.info](https://text.baldanders.info)\n"
if str != res {
t.Errorf("Execute(markdown) = \"%v\", want \"%v\".", str, res)
}
Expand All @@ -59,7 +59,7 @@ func TestStyleWiki(t *testing.T) {
outBuf := new(bytes.Buffer)
outErrBuf := new(bytes.Buffer)
ui := rwi.New(rwi.WithWriter(outBuf), rwi.WithErrorWriter(outErrBuf))
args := []string{"-s", "wiki", "http://text.baldanders.info"}
args := []string{"-s", "wiki", "https://text.baldanders.info"}

exit := Execute(ui, args)
if exit != exitcode.Normal {
Expand All @@ -70,14 +70,14 @@ func TestStyleWiki(t *testing.T) {
t.Errorf("Execute(wiki) = \"%v\", want \"%v\".", str, "")
}
str = outBuf.String()
res := "[http://text.baldanders.info text.Baldanders.info]\n"
res := "[https://text.baldanders.info text.Baldanders.info]\n"
if str != res {
t.Errorf("Execute(wiki) = \"%v\", want \"%v\".", str, res)
}
}

func TestPipe(t *testing.T) {
inData := bytes.NewBufferString("http://text.baldanders.info")
inData := bytes.NewBufferString("https://text.baldanders.info")
outBuf := new(bytes.Buffer)
outErrBuf := new(bytes.Buffer)
ui := rwi.New(rwi.WithReader(inData), rwi.WithWriter(outBuf), rwi.WithErrorWriter(outErrBuf))
Expand All @@ -92,7 +92,7 @@ func TestPipe(t *testing.T) {
t.Errorf("Execute(pipe) = \"%v\", want \"%v\".", str, "")
}
str = outBuf.String()
res := "[text.Baldanders.info](http://text.baldanders.info)\n"
res := "[text.Baldanders.info](https://text.baldanders.info)\n"
if str != res {
t.Errorf("Execute(pipe) = \"%v\", want \"%v\".", str, res)
}
Expand Down
2 changes: 1 addition & 1 deletion cli/mklink/facade/interactive.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"io"

"github.com/atotto/clipboard"
"github.com/spiegel-im-spiegel/errs"
"github.com/spiegel-im-spiegel/gocli/rwi"
"github.com/spiegel-im-spiegel/gprompt"
"github.com/spiegel-im-spiegel/mklink/cli/mklink/makelink"
"github.com/spiegel-im-spiegel/mklink/errs"
)

func interactiveMode(ui *rwi.RWI, cxt *makelink.Context) error {
Expand Down
4 changes: 2 additions & 2 deletions cli/mklink/makelink/makelink.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"io"

"github.com/spiegel-im-spiegel/errs"
"github.com/spiegel-im-spiegel/mklink"
"github.com/spiegel-im-spiegel/mklink/errs"
)

//Context class is context for making link
Expand All @@ -23,7 +23,7 @@ func New(s mklink.Style, log io.Writer) *Context {
//MakeLink is making link
func (c *Context) MakeLink(url string) (io.Reader, error) {
if c == nil {
return nil, errs.Wrap(errs.ErrNullPointer, "reference error")
return nil, errs.Wrap(mklink.ErrNullPointer, "reference error")
}
lnk, err := mklink.New(url)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion errs/errs.go → errs.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package errs
package mklink

import "fmt"

Expand Down
30 changes: 0 additions & 30 deletions errs/cause.go

This file was deleted.

136 changes: 0 additions & 136 deletions errs/errs_test.go

This file was deleted.

67 changes: 0 additions & 67 deletions errs/wrapper.go

This file was deleted.

Loading

0 comments on commit 33de38a

Please sign in to comment.