Our great sponsors
-
addlicense
A program which ensures source code files have copyright license headers by scanning directory patterns recursively
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
doublestar
Implements support for double star (**) matches in golang's path.Match and filepath.Glob.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
This article introduces a more powerful license statement management tool called NWA. It helps you effortlessly add license headers to your code files and also check, update, and remove existing license statements, ensuring the legality and compliance of your code.
This is where license header adding tools come in handy. One commonly used tool is the addlicense project under the 'google' organization. 'addlicense' allows you to add license statements to specified files via command-line interaction. However, 'addlicense' has limited functionality; it only adds license headers to files. Some issues raised for 'addlicense' include:
To help you get started with NWA's functionality, developers have provided nwa-examples to help you learn how to use NWA in a practical way. You can clone this project and follow the tutorial or simply refer to this guide and use nwa-examples for more usage examples.
NWA is a command-line tool built on cobra. Here's an overview of NWA's commands:
-s's default value is an empty array, so you can use zero or more -s flags to specify file paths to skip. This path supports doublestar syntax, making it very flexible. For example: