From 9e0544678ac71c287207e27946ea544078fe89e0 Mon Sep 17 00:00:00 2001 From: Alexander Neonxp Kiryukhin Date: Tue, 10 Mar 2026 15:25:45 +0300 Subject: =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BC=D0=BC=D0=B5=D0=BD=D1=82=D0=B0=D1=80=D0=B8?= =?UTF-8?q?=D0=B8=20=D0=B2=20=D0=BF=D0=B0=D0=BA=D0=B5=D1=82=D0=B0=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc.go | 16 ++++++++++++++++ gen.go | 16 ++++++++++++++++ loader.go | 4 ++-- loader_test.go | 4 ++-- model/directive.go | 4 ++-- model/group.go | 4 ++-- model/model.go | 4 ++-- parser/errors.go | 4 ++-- parser/grammar.peg | 4 ++-- 9 files changed, 46 insertions(+), 14 deletions(-) diff --git a/doc.go b/doc.go index 51419d4..b6cdeed 100644 --- a/doc.go +++ b/doc.go @@ -1,2 +1,18 @@ // Package conf is a library to read conf format files. package conf + +// This file is part of conf library. +// Copyright (C) 2026 Alexander NeonXP Kiryukhin +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . diff --git a/gen.go b/gen.go index fcbf8c8..df56ae8 100644 --- a/gen.go +++ b/gen.go @@ -1,3 +1,19 @@ package conf +// This file is part of conf library. +// Copyright (C) 2026 Alexander NeonXP Kiryukhin +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + //go:generate go tool github.com/mna/pigeon -optimize-grammar -optimize-parser -nolint -o ./parser/parser.go ./parser/grammar.peg diff --git a/loader.go b/loader.go index 9c5fe13..477eddd 100644 --- a/loader.go +++ b/loader.go @@ -1,5 +1,6 @@ // Package conf library for parsing `.conf` configuration files. -// +package conf + // This file is part of conf library. // Copyright (C) 2026 Alexander NeonXP Kiryukhin // @@ -15,7 +16,6 @@ // // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package conf import ( "fmt" diff --git a/loader_test.go b/loader_test.go index e2d7e48..511d61d 100644 --- a/loader_test.go +++ b/loader_test.go @@ -1,5 +1,6 @@ // Package conf_test tests. -// +package conf_test + // This file is part of conf library. // Copyright (C) 2026 Alexander NeonXP Kiryukhin // @@ -15,7 +16,6 @@ // // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package conf_test import ( "fmt" diff --git a/model/directive.go b/model/directive.go index a4ab032..d2ea8d4 100644 --- a/model/directive.go +++ b/model/directive.go @@ -1,5 +1,6 @@ // Package model implements custom types and methods used in conf parser. -// +package model + // This file is part of conf library. // Copyright (C) 2026 Alexander NeonXP Kiryukhin // @@ -15,7 +16,6 @@ // // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package model import ( "strconv" diff --git a/model/group.go b/model/group.go index a06c2ef..cbd965d 100644 --- a/model/group.go +++ b/model/group.go @@ -1,5 +1,6 @@ // Package model implements custom types and methods used in conf parser. -// +package model + // This file is part of conf library. // Copyright (C) 2026 Alexander NeonXP Kiryukhin // @@ -15,7 +16,6 @@ // // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package model import "iter" diff --git a/model/model.go b/model/model.go index 6f18f6f..80485e2 100644 --- a/model/model.go +++ b/model/model.go @@ -1,5 +1,6 @@ // Package model implements custom types and methods used in conf parser. -// +package model + // This file is part of conf library. // Copyright (C) 2026 Alexander NeonXP Kiryukhin // @@ -15,6 +16,5 @@ // // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package model type Ident string diff --git a/parser/errors.go b/parser/errors.go index b1f839e..18c03d4 100644 --- a/parser/errors.go +++ b/parser/errors.go @@ -1,5 +1,6 @@ // Package parser parses conf language. -// +package parser + // This file is part of conf library. // Copyright (C) 2026 Alexander NeonXP Kiryukhin // @@ -15,7 +16,6 @@ // // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package parser import ( "bytes" diff --git a/parser/grammar.peg b/parser/grammar.peg index 760257f..3c1774d 100644 --- a/parser/grammar.peg +++ b/parser/grammar.peg @@ -1,6 +1,7 @@ { // Package parser parses conf language. - // + package parser + // This file is part of conf library. // Copyright (C) 2026 Alexander NeonXP Kiryukhin // @@ -16,7 +17,6 @@ // // You should have received a copy of the GNU General Public License // along with this program. If not, see . - package parser import ( "strconv" -- cgit v1.2.3