Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase to nxadm #12

Draft
wants to merge 111 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
000912a
fix fsnotify relocation
Mar 21, 2018
a1dbeea
Merge pull request #138 from vsco/ljk/fix-fsnotify
May 14, 2018
d372e6f
doc changes
nxadm Sep 6, 2019
5ed0c26
Move to go mod
nxadm Sep 6, 2019
a805f37
doc
nxadm Sep 6, 2019
2c2ee8c
disable remote go get (vendored)
nxadm Sep 6, 2019
50eafd5
use github for fsnotify
nxadm Sep 6, 2019
df3b64b
bump minimum go version to 1.9
nxadm Sep 6, 2019
1915163
travis golang 1.10
nxadm Sep 6, 2019
bcb6c05
doc
nxadm Sep 6, 2019
754f1ca
PR 131 hpcloud/tail
nxadm Sep 6, 2019
bf6fda2
fix test
nxadm Sep 6, 2019
2c2f575
fix cmd
nxadm Sep 6, 2019
ecdd669
fix cmd
nxadm Sep 6, 2019
668bbed
PR 126 by @Code-Hex
nxadm Sep 6, 2019
283b0a2
travis build status
nxadm Sep 6, 2019
122c453
document new release
nxadm Sep 6, 2019
382cec4
doc
nxadm Sep 6, 2019
6135ec2
fmt
nxadm Sep 6, 2019
0c29156
PR 152 by @AHaymond
nxadm Sep 6, 2019
0b8a2f1
PR 120 by @integrii
nxadm Sep 6, 2019
4f289e6
doc
nxadm Sep 6, 2019
68ab7d9
Update README.md
nxadm Sep 6, 2019
54f066a
PR 128 by @jadekler
nxadm Sep 8, 2019
072d7c2
PR 130 by @fgeller
nxadm Sep 8, 2019
fc85609
PR 133 by @sm3142
nxadm Sep 8, 2019
2085199
Document PRs
nxadm Sep 8, 2019
659b0de
fix upstream link
nxadm Sep 9, 2019
927fd1e
standard naming, removal of Makefiles
nxadm Sep 9, 2019
bf9ccdd
PR 149 by @mezzi
nxadm Sep 9, 2019
aa63e78
Version log
nxadm Sep 9, 2019
87bea3a
PR 114 by phemmer
nxadm Sep 9, 2019
32bdac6
fmt
nxadm Sep 9, 2019
851ee5b
fmt
nxadm Sep 9, 2019
b6839f5
Fix deadlock when stopping on non-empty file/buffer (#7)
lukedirtwalker Sep 23, 2019
72231d7
Update CHANGES.md
nxadm Sep 23, 2019
67a2ec2
Added seekinfo to Tail (#9)
mschneider82 Oct 25, 2019
7f7bfd9
new release
nxadm Oct 29, 2019
cc4a94d
PR #162 by @Mohammed90
nxadm Nov 19, 2019
94f3836
add PR to changes
nxadm Nov 19, 2019
32659de
document dot release
nxadm Nov 25, 2019
327c577
document dot release
nxadm Nov 25, 2019
0de700b
Travis-CI: cleanup Go versions (#15)
dolmen Jun 23, 2020
2683a83
add 1.15 on travis
nxadm Sep 30, 2020
a2325a3
Create codeql-analysis.yml
nxadm Oct 1, 2020
edf6bc2
Update codeql-analysis.yml
nxadm Oct 1, 2020
5b4ba4f
add examples
nxadm Dec 24, 2020
610687c
update vendor
nxadm Dec 24, 2020
38d2eb6
add tests
nxadm Dec 24, 2020
2efc79c
Update doc
nxadm Dec 24, 2020
ed49347
changelog
nxadm Dec 24, 2020
cab0153
Comment
nxadm Dec 24, 2020
d8f58d0
Remove Windows warning
nxadm Jan 25, 2021
a647ed5
pkg.go.dev badge
nxadm Jan 25, 2021
a422e23
github ci
nxadm Jan 25, 2021
cc71874
Merge branch 'master' of github.com:nxadm/tail
nxadm Jan 25, 2021
b50b897
go test -race
nxadm Jan 25, 2021
5acebfb
add go versions to ci
nxadm Jan 25, 2021
eb2b1e1
debug
nxadm Jan 25, 2021
50cb998
add 1.14 and 1.13
nxadm Jan 25, 2021
418f0c6
add 1.12 and 1.11
nxadm Jan 25, 2021
1a092ff
add 1.10 and 1.9
nxadm Jan 25, 2021
8250fb4
set go 1.11 as minimum supported
nxadm Jan 25, 2021
1da4c05
add pre go modules tests
nxadm Jan 25, 2021
5cad347
add pre go modules tests
nxadm Jan 25, 2021
c9ae386
mod enabled go
nxadm Jan 25, 2021
833f8e7
move to github actions
nxadm Jan 25, 2021
f525db6
move to github actions
nxadm Jan 25, 2021
633b8f6
windows + mac builds
nxadm Jan 25, 2021
d51d5a4
windows + mac builds
nxadm Jan 25, 2021
463d4e8
suport windows vars
nxadm Jan 25, 2021
06eff90
also test and build on macos and windows
nxadm Jan 25, 2021
51e7e39
Update README.md
nxadm Jan 25, 2021
eda6095
simplify matrix
nxadm Jan 26, 2021
e504be0
Merge branch 'master' of github.com:nxadm/tail
nxadm Jan 26, 2021
ba71f3a
Create dependabot.yml
nxadm Feb 6, 2021
55c9bff
presentation of repo
nxadm Feb 6, 2021
5973448
Update issue templates
nxadm Feb 6, 2021
0787eec
Update issue templates
nxadm Feb 6, 2021
d79bace
Link to defunct HPE Helion
nxadm Feb 6, 2021
7d325f5
Wording
nxadm Feb 6, 2021
2c1f619
Doc cleanup and extension (#22)
nxadm Feb 7, 2021
abad231
add example in godoc
nxadm Feb 7, 2021
58ffebe
move tests to ubuntu20.04
nxadm Feb 7, 2021
d92f587
FreeBSD CI support (#23)
nxadm Feb 7, 2021
f9aa15d
link to doc paragraph of godoc
nxadm Feb 7, 2021
262f0aa
Update README.md
nxadm Feb 7, 2021
b266da8
Create CONTRIBUTING.md
nxadm Feb 7, 2021
ff05002
example for nxadm/tail#6 (#24)
nxadm Feb 8, 2021
dd7b772
order imports
nxadm Feb 8, 2021
9254734
Update ci.yml
nxadm Mar 6, 2021
da54e9f
Bump github.com/fsnotify/fsnotify from 1.4.9 to 1.5.1 (#32)
dependabot[bot] Nov 2, 2021
bd5be8a
prepare fix #28
nxadm Nov 2, 2021
6327674
Use temp directory for tests, instead of relative (#29)
ches Nov 2, 2021
03e3f42
Merge branch 'master' of github.com:nxadm/tail
nxadm Nov 2, 2021
1614e6b
doc
nxadm Nov 2, 2021
6e33b28
Add timeouts to tests (#27)
kokes Nov 2, 2021
af851de
add timeout to freebsd tests as well
nxadm Nov 2, 2021
0b92b34
Merge branch 'master' of github.com:nxadm/tail
nxadm Nov 2, 2021
6abd9f9
changeme
nxadm Nov 2, 2021
4472660
Config setting to only yield complete lines (#26)
kokes Dec 16, 2021
cbff2e2
bump fsnotify to fix some issues
nxadm Oct 10, 2023
ba755e4
test on more recents go releases
nxadm Oct 10, 2023
ef0b042
ensure the watcher has started before we read (#2)
phemmer Mar 29, 2017
6a7b985
Rewrite import paths :(
danielnelson Mar 29, 2017
26e4f91
Do not Seek when named pipe is watched (#4)
maxatome Mar 27, 2018
a04f2fd
Add ability to customize the io.Reader (#7)
danielnelson Jul 7, 2020
fc14f9d
fix(watch): Fixing never-ending poll modify notification
vlastahajek Dec 8, 2020
32b5ca5
added fix and test to tail issue
krhoda Nov 4, 2020
31c45bb
chore: fix race condition in watcher implementations
neelayu Nov 16, 2022
ea8cd32
Merge branch 'master' into rebase-to-nxadm
dayvar14 Feb 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
task:
name: FreeBSD
freebsd_instance:
image_family: freebsd-12-2
install_script: pkg install -y go
script: |
go build
go test -v -race -timeout 2m ./...
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

If you sent an issue/PR to hpcloud, you can have a look at
[this meta issue](https://github.com/nxadm/tail/issues/6) tracking issues
and PRs of the dormant upstream. However, as the code bases diverge the
issue may have been solved already.

**Describe the bug**
A clear and concise description of what the bug is.

**Expected behaviour**
A clear and concise description of what you expected to happen.

**To Reproduce**
Steps to reproduce the behaviour:, preferably with a code sample.

**System information**
- tail version [e.g. 1.4.6]
- OS: [e.g. Ubuntu 20.04]
- Arch: [e.g. amd64]

**Additional context**
Add any other context about the problem here.
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

If you sent an issue/PR to hpcloud, you can have a look at
[this meta issue](https://github.com/nxadm/tail/issues/6) tracking issues
and PRs of the dormant upstream. However, as the code bases diverge the
issue may have been implemented already.

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: ci
on: [push, pull_request]
jobs:
test-build:
strategy:
matrix:
go-version: [1.21.x, 1.20.x, 1.19.x, 1.18.x]
os: [ubuntu-20.04, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Test
run: go test -race -v -timeout 2m ./...
- name: Build lib
run: go build
- name: Build cmd
run: go build
working-directory: ./cmd/gotail
71 changes: 71 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"

on:
push:
branches: [master, noTomb]
pull_request:
# The branches below must be a subset of the branches above
branches: [master, noTomb]
schedule:
- cron: '0 19 * * 4'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['go']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
.test
.go

.idea/
examples/_*
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

83 changes: 42 additions & 41 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,64 @@
# API v1 (gopkg.in/hpcloud/tail.v1)
# Version v1.4.11
* Bump fsnotify to v1.6.0. Should fix some issues.

## April, 2016
# Version v1.4.9
* Bump fsnotify to v1.5.1 fixes issue #28, hpcloud/tail#90.
* PR #27: "Add timeout to tests"by @kokes++. Also timeout on FreeBSD.
* PR #29: "Use temp directory for tests, instead of relative" by @ches++.

* Migrated to godep, as depman is not longer supported
* Introduced golang vendoring feature
* Fixed issue [#57](https://github.com/hpcloud/tail/issues/57) related to reopen deleted file
# Version v1.4.7-v1.4.8
* Documentation updates.
* Small linter cleanups.
* Added example in test.

## July, 2015
# Version v1.4.6

* Fix inotify watcher leak; remove `Cleanup` (#51)
* Document the usage of Cleanup when re-reading a file (thanks to @lesovsky) for issue #18.
* Add example directories with example and tests for issues.

# API v0 (gopkg.in/hpcloud/tail.v0)
# Version v1.4.4-v1.4.5

## June, 2015
* Fix of checksum problem because of forced tag. No changes to the code.

* Don't return partial lines (PR #40)
* Use stable version of fsnotify (#46)
# Version v1.4.1

## July, 2014
* Incorporated PR 162 by by Mohammed902: "Simplify non-Windows build tag".

* Fix tail for Windows (PR #36)
# Version v1.4.0

## May, 2014
* Incorporated PR 9 by mschneider82: "Added seekinfo to Tail".

* Improved rate limiting using leaky bucket (PR #29)
* Fix odd line splitting (PR #30)
# Version v1.3.1

## Apr, 2014
* Incorporated PR 7: "Fix deadlock when stopping on non-empty file/buffer",
fixes upstream issue 93.

* LimitRate now discards read buffer (PR #28)
* allow reading of longer lines if MaxLineSize is unset (PR #24)
* updated deps.json to latest fsnotify (441bbc86b1)

## Feb, 2014
# Version v1.3.0

* added `Config.Logger` to suppress library logging
* Incorporated changes of unmerged upstream PR 149 by mezzi: "added line num
to Line struct".

## Nov, 2013
# Version v1.2.1

* add Cleanup to remove leaky inotify watches (PR #20)
* Incorporated changes of unmerged upstream PR 128 by jadekler: "Compile-able
code in readme".
* Incorporated changes of unmerged upstream PR 130 by fgeller: "small change
to comment wording".
* Incorporated changes of unmerged upstream PR 133 by sm3142: "removed
spurious newlines from log messages".

## Aug, 2013
# Version v1.2.0

* redesigned Location field (PR #12)
* add tail.Tell (PR #14)
* Incorporated changes of unmerged upstream PR 126 by Code-Hex: "Solved the
problem for never return the last line if it's not followed by a newline".
* Incorporated changes of unmerged upstream PR 131 by StoicPerlman: "Remove
deprecated os.SEEK consts". The changes bumped the minimal supported Go
release to 1.9.

## July, 2013
# Version v1.1.0

* Rate limiting (PR #10)
* migration to go modules.
* release of master branch of the dormant upstream, because it contains
fixes and improvement no present in the tagged release.

## May, 2013

* Detect file deletions/renames in polling file watcher (PR #1)
* Detect file truncation
* Fix potential race condition when reopening the file (issue 5)
* Fix potential blocking of `tail.Stop` (issue 4)
* Fix uncleaned up ChangeEvents goroutines after calling tail.Stop
* Support Follow=false

## Feb, 2013

* Initial open source release
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Contributing
Comments (at Discussions), Issues and PRs are always welcome. In the case of issues,
code examples make it easier to reproduce the problem. In the case of PRs add tests
if applicable so we make sure nothing breaks for people using the library on different
OSes.
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/hpcloud/tail/
ADD . $GOPATH/src/github.com/hpcloud/tail/
RUN mkdir -p $GOPATH/src/github.com/nxadm/tail/
ADD . $GOPATH/src/github.com/nxadm/tail/

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

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

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

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

Expand Down
15 changes: 0 additions & 15 deletions Godeps/Godeps.json

This file was deleted.

5 changes: 0 additions & 5 deletions Godeps/Readme

This file was deleted.

File renamed without changes.
11 changes: 0 additions & 11 deletions Makefile

This file was deleted.

Loading