Skip to content

Commit

Permalink
Merge pull request #4 from SEKOIA-IO/chore/update_module_name
Browse files Browse the repository at this point in the history
chore: Update module name
  • Loading branch information
Darkheir authored Jul 25, 2023
2 parents 2e40bfe + 32a8d5a commit d3822e7
Show file tree
Hide file tree
Showing 23 changed files with 50 additions and 212 deletions.
30 changes: 0 additions & 30 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

25 changes: 0 additions & 25 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

11 changes: 0 additions & 11 deletions .github/dependabot.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/ci.yml

This file was deleted.

71 changes: 0 additions & 71 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
FROM golang

RUN mkdir -p $GOPATH/src/github.com/nxadm/tail/
ADD . $GOPATH/src/github.com/nxadm/tail/
RUN mkdir -p $GOPATH/src/github.com/SEKOIA-IO/tail/
ADD . $GOPATH/src/github.com/SEKOIA-IO/tail/

# expecting to fetch dependencies successfully.
RUN go get -v github.com/nxadm/tail
RUN go get -v github.com/SEKOIA-IO/tail

# expecting to run the test successfully.
RUN go test -v github.com/nxadm/tail
RUN go test -v github.com/SEKOIA-IO/tail

# expecting to install successfully
RUN go install -v github.com/nxadm/tail
RUN go install -v github.com/nxadm/tail/cmd/gotail
RUN go install -v github.com/SEKOIA-IO/tail
RUN go install -v github.com/SEKOIA-IO/tail/cmd/gotail

RUN $GOPATH/bin/gotail -h || true

Expand Down
20 changes: 8 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[![Go Reference](https://pkg.go.dev/badge/github.com/nxadm/tail.svg)](https://pkg.go.dev/github.com/nxadm/tail#section-documentation)
![ci](https://github.com/nxadm/tail/workflows/ci/badge.svg)
[![FreeBSD](https://api.cirrus-ci.com/github/nxadm/tail.svg)](https://cirrus-ci.com/github/nxadm/tail)
[![Go Reference](https://pkg.go.dev/badge/github.com/SEKOIA-IO/tail.svg)](https://pkg.go.dev/github.com/SEKOIA-IO/tail#section-documentation)
![ci](https://github.com/SEKOIA-IO/tail/workflows/ci/badge.svg)
[![FreeBSD](https://api.cirrus-ci.com/github/SEKOIA-IO/tail.svg)](https://cirrus-ci.com/github/SEKOIA-IO/tail)
# tail functionality in Go

nxadm/tail provides a Go library that emulates the features of the BSD `tail`
SEKOIA-IO/tail provides a Go library that emulates the features of the BSD `tail`
program. The library comes with full support for truncation/move detection as
it is designed to work with log rotation tools. The library works on all
operating systems supported by Go, including POSIX systems like Linux, *BSD,
Expand All @@ -25,21 +25,17 @@ for line := range t.Lines {
}
```

See [API documentation](https://pkg.go.dev/github.com/nxadm/tail#section-documentation).
See [API documentation](https://pkg.go.dev/github.com/SEKOIA-IO/tail#section-documentation).

## Installing

go get github.com/nxadm/tail/...
go get github.com/SEKOIA-IO/tail

## History

This project is an active, drop-in replacement for the
[abandoned](https://en.wikipedia.org/wiki/HPE_Helion) Go tail library at
[hpcloud](https://github.com/hpcloud/tail). Next to
[addressing open issues/PRs of the original project](https://github.com/nxadm/tail/issues/6),
nxadm/tail continues the development by keeping up to date with the Go toolchain
(e.g. go modules) and dependencies, completing the documentation, adding features
and fixing bugs.
abandoned Go tail library at [nxadm](https://github.com/nxadm/tail)
that itself is a fork of [hpcloud](https://github.com/hpcloud/tail).

## Examples
Examples, e.g. used to debug an issue, are kept in the [examples directory](/examples).
7 changes: 4 additions & 3 deletions cmd/gotail/gotail.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail
// Copyright (c) 2019 FOSS contributors of https://github.com/SEKOIA-IO/tail
// Copyright (c) 2015 HPE Software Inc. All rights reserved.
// Copyright (c) 2013 ActiveState Software Inc. All rights reserved.

Expand All @@ -7,9 +7,10 @@ package main
import (
"flag"
"fmt"
"io"
"io"
"os"
"github.com/nxadm/tail"

"github.com/SEKOIA-IO/tail"
)

func args2config() (tail.Config, int64) {
Expand Down
2 changes: 1 addition & 1 deletion examples/01-tailAndPrint/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package main
import (
"fmt"

"github.com/nxadm/tail"
"github.com/SEKOIA-IO/tail"
)

var logFile = "/var/log/syslog"
Expand Down
2 changes: 1 addition & 1 deletion examples/02-closeAndReopen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"time"

"github.com/nxadm/tail"
"github.com/SEKOIA-IO/tail"
)

var logFile = "/var/log/syslog"
Expand Down
4 changes: 2 additions & 2 deletions examples/03-consumeJSON/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"io/ioutil"
"os"
"strconv"
"github.com/nxadm/tail"

"github.com/SEKOIA-IO/tail"
)

type jsonStruct struct {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/nxadm/tail
module github.com/SEKOIA-IO/tail

go 1.17

Expand Down
10 changes: 5 additions & 5 deletions tail.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail
// Copyright (c) 2019 FOSS contributors of https://github.com/SEKOIA-IO/tail
// Copyright (c) 2015 HPE Software Inc. All rights reserved.
// Copyright (c) 2013 ActiveState Software Inc. All rights reserved.

// nxadm/tail provides a Go library that emulates the features of the BSD `tail`
// SEKOIA-IO/tail provides a Go library that emulates the features of the BSD `tail`
// program. The library comes with full support for truncation/move detection as
// it is designed to work with log rotation tools. The library works on all
// operating systems supported by Go, including POSIX systems like Linux and
Expand All @@ -21,9 +21,9 @@ import (
"sync"
"time"

"github.com/nxadm/tail/ratelimiter"
"github.com/nxadm/tail/util"
"github.com/nxadm/tail/watch"
"github.com/SEKOIA-IO/tail/ratelimiter"
"github.com/SEKOIA-IO/tail/util"
"github.com/SEKOIA-IO/tail/watch"
"gopkg.in/tomb.v1"
)

Expand Down
3 changes: 2 additions & 1 deletion tail_posix.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail
// Copyright (c) 2019 FOSS contributors of https://github.com/SEKOIA-IO/tail
//go:build !windows
// +build !windows

package tail
Expand Down
6 changes: 3 additions & 3 deletions tail_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail
// Copyright (c) 2019 FOSS contributors of https://github.com/SEKOIA-IO/tail
// Copyright (c) 2015 HPE Software Inc. All rights reserved.
// Copyright (c) 2013 ActiveState Software Inc. All rights reserved.

Expand All @@ -17,8 +17,8 @@ import (
"testing"
"time"

"github.com/nxadm/tail/ratelimiter"
"github.com/nxadm/tail/watch"
"github.com/SEKOIA-IO/tail/ratelimiter"
"github.com/SEKOIA-IO/tail/watch"
)

func TestTailFile(t *testing.T) {
Expand Down
5 changes: 3 additions & 2 deletions tail_windows.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail
// Copyright (c) 2019 FOSS contributors of https://github.com/SEKOIA-IO/tail
//go:build windows
// +build windows

package tail

import (
"os"

"github.com/nxadm/tail/winfile"
"github.com/SEKOIA-IO/tail/winfile"
)

// Deprecated: this function is only useful internally and, as such,
Expand Down
4 changes: 2 additions & 2 deletions util/util.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail
// Copyright (c) 2019 FOSS contributors of https://github.com/SEKOIA-IO/tail
// Copyright (c) 2015 HPE Software Inc. All rights reserved.
// Copyright (c) 2013 ActiveState Software Inc. All rights reserved.

Expand All @@ -19,7 +19,7 @@ var LOGGER = &Logger{log.New(os.Stderr, "", log.LstdFlags)}

// fatal is like panic except it displays only the current goroutine's stack.
func Fatal(format string, v ...interface{}) {
// https://github.com/nxadm/log/blob/master/log.go#L45
// https://github.com/SEKOIA-IO/log/blob/master/log.go#L45
LOGGER.Output(2, fmt.Sprintf("FATAL -- "+format, v...)+"\n"+string(debug.Stack()))
os.Exit(1)
}
Expand Down
2 changes: 1 addition & 1 deletion watch/filechanges.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail
// Copyright (c) 2019 FOSS contributors of https://github.com/SEKOIA-IO/tail
package watch

type FileChanges struct {
Expand Down
6 changes: 3 additions & 3 deletions watch/inotify.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail
// Copyright (c) 2019 FOSS contributors of https://github.com/SEKOIA-IO/tail
// Copyright (c) 2015 HPE Software Inc. All rights reserved.
// Copyright (c) 2013 ActiveState Software Inc. All rights reserved.

Expand All @@ -9,9 +9,9 @@ import (
"os"
"path/filepath"

"github.com/nxadm/tail/util"
"github.com/SEKOIA-IO/tail/util"

"github.com/fsnotify/fsnotify"
"github.com/fsnotify/fsnotify"
"gopkg.in/tomb.v1"
)

Expand Down
Loading

0 comments on commit d3822e7

Please sign in to comment.