https://github.com/containerd/ltag
Prepends project files with given template.
https://github.com/containerd/ltag
Last synced: 10 months ago
JSON representation
Prepends project files with given template.
- Host: GitHub
- URL: https://github.com/containerd/ltag
- Owner: containerd
- License: mit
- Created: 2018-02-06T08:51:41.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2025-03-04T04:05:13.000Z (about 1 year ago)
- Last Synced: 2025-06-08T01:11:23.748Z (11 months ago)
- Language: Go
- Size: 55.7 KB
- Stars: 19
- Watchers: 15
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### ltag
Prepends project files with given template.
- Can be used for adding licence or copyright information on src files of project.
- Skip file, if template (as provided) already present
- Supports Golang source files, Dockerfile, Makefiles and bash scripts
- Take cares of compiler flags for golang source files and shebang of bash scripts.
- Take cares of Golang Package comments too.
#### Install
```
go install github.com/containerd/ltag@latest
```
> [!NOTE]
>
> The module name was `github.com/kunalkushwaha/ltag` until v0.2.6.
#### Usage
``` console
$ ltag
$ ltag --help
Usage of ltag:
-check
check files missing header
-excludes string
exclude folders (default "vendor")
-path string
project path (default ".")
-t string
template files path (default "./template")
-v verbose output
```
### Example
To Apply header from `./template` folder
``` console
$ ltag -path=temp -v
Files modified : 11
temp/Dockerfile/Dockerfile
...
```
To Check if files missing header
``` console
$ ltag -path=temp --check -v
temp/Dockerfile/Dockerfile
temp/Dockerfile/abc.dockerfile
temp/src/lvl1/doc.go
temp/src/lvl1/temp.go
```