aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author2026-03-10 15:25:45 +0300
committer2026-03-10 15:25:45 +0300
commit9e0544678ac71c287207e27946ea544078fe89e0 (patch)
treefbec1e3209b9d6fa00028e5bb1c79343fcb29501
parentОтполировал библиотеку, чтобы в идеале бо... (diff)
downloadconf-9e0544678ac71c287207e27946ea544078fe89e0.tar.gz
conf-9e0544678ac71c287207e27946ea544078fe89e0.tar.bz2
conf-9e0544678ac71c287207e27946ea544078fe89e0.tar.xz
conf-9e0544678ac71c287207e27946ea544078fe89e0.zip
Поправил комментарии в пакетахHEADv1.0.1master
Diffstat (limited to '')
-rw-r--r--doc.go16
-rw-r--r--gen.go16
-rw-r--r--loader.go4
-rw-r--r--loader_test.go4
-rw-r--r--model/directive.go4
-rw-r--r--model/group.go4
-rw-r--r--model/model.go4
-rw-r--r--parser/errors.go4
-rw-r--r--parser/grammar.peg4
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 <i@neonxp.ru>
+//
+// 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 <https://www.gnu.org/licenses/>.
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 <i@neonxp.ru>
+//
+// 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 <https://www.gnu.org/licenses/>.
+
//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 <i@neonxp.ru>
//
@@ -15,7 +16,6 @@
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
-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 <i@neonxp.ru>
//
@@ -15,7 +16,6 @@
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
-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 <i@neonxp.ru>
//
@@ -15,7 +16,6 @@
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
-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 <i@neonxp.ru>
//
@@ -15,7 +16,6 @@
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
-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 <i@neonxp.ru>
//
@@ -15,6 +16,5 @@
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
-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 <i@neonxp.ru>
//
@@ -15,7 +16,6 @@
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
-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 <i@neonxp.ru>
//
@@ -16,7 +17,6 @@
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
- package parser
import (
"strconv"