An open API service indexing awesome lists of open source software.

https://github.com/haya14busa/offset

get file position from offset
https://github.com/haya14busa/offset

cli go

Last synced: about 1 year ago
JSON representation

get file position from offset

Awesome Lists containing this project

README

          

# offset - get file position from offset

[![Go status](https://github.com/haya14busa/offset/workflows/Go/badge.svg)](https://github.com/haya14busa/offset/actions)
[![GoDoc](https://godoc.org/github.com/haya14busa/offset?status.svg)](https://godoc.org/github.com/haya14busa/offset)

## Usage

```go
import "github.com/haya14busa/offset"
```

[![GoDoc](https://godoc.org/github.com/haya14busa/offset?status.svg)](https://godoc.org/github.com/haya14busa/offset)

## CLI

### Installation

```shell
# Go
$ go get github.com/haya14busa/offset/cmd/offset
```

### offset -h

```
Usage: offset [FLAGS] [File]
Return position from given offset
Flags:
-offset int
byte offset
-version
print version

GitHub: https://github.com/haya14busa/offset
```

### Example

```shell
$ offset -offset 14 LICENSE
{"file":"LICENSE","offset":14,"line":3,"column":1}
```