From 1889a3ae7b81d0b43d29dbc7b31c9dae7d431380 Mon Sep 17 00:00:00 2001 From: Kamil Dziedzic Date: Tue, 18 Aug 2020 08:09:53 +0200 Subject: [PATCH] Ignore swag file from root dir only (#775) * Ignore swag file from root dir only The rule `swag` matches not only file in main directory but also folder in `cmd/swag`. I've changed it to match only in current folder. For visual I've changed also `swag.exe`. I've run into issue when I tried to vendor sources for swag but also for tool. The main.go got ignored by git, I was required to `git add -f vendor/github.com/swaggo/swag/cmd/swag/main.go` * Properly .gitignore from main folder only. --- .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index bea8db681..a77cb497c 100644 --- a/.gitignore +++ b/.gitignore @@ -16,5 +16,5 @@ cover.out # Etc .DS_Store -swag -swag.exe +/swag +/swag.exe