From 55283d3c9140dcbd83e8bb5d246d899f53415ad9 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Tue, 12 Apr 2022 11:25:18 +0300 Subject: [PATCH] [#179] Rename `resolver` package to `ns` `resolver` isn't suitable name for the package with NeoFS name system functionality. Signed-off-by: Leonard Lyubich --- README.md | 2 +- {resolver => ns}/dns.go | 2 +- {resolver => ns}/doc.go | 4 ++-- {resolver => ns}/nns.go | 2 +- {resolver => ns}/nns_test.go | 2 +- {resolver => ns}/util.go | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) rename {resolver => ns}/dns.go (97%) rename {resolver => ns}/doc.go (83%) rename {resolver => ns}/nns.go (99%) rename {resolver => ns}/nns_test.go (99%) rename {resolver => ns}/util.go (79%) diff --git a/README.md b/README.md index 0628f4d..6740d97 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ version prefix and checksum in addition to script-hash. ### token Contains Bearer token type with several NeoFS-specific methods. -### resolver +### ns In NeoFS there are 2 types of name resolution: DNS and NNS. NNS stands for Neo Name Service is just a [contract](https://github.com/nspcc-dev/neofs-contract/) deployed on a Neo blockchain. Basically, NNS is just a DNS-on-chain which can be used for resolving container nice-names as well diff --git a/resolver/dns.go b/ns/dns.go similarity index 97% rename from resolver/dns.go rename to ns/dns.go index f723eab..56a6f09 100644 --- a/resolver/dns.go +++ b/ns/dns.go @@ -1,4 +1,4 @@ -package resolver +package ns import ( "net" diff --git a/resolver/doc.go b/ns/doc.go similarity index 83% rename from resolver/doc.go rename to ns/doc.go index 0a46954..3e00856 100644 --- a/resolver/doc.go +++ b/ns/doc.go @@ -1,5 +1,5 @@ /* -Package resolver provides functionality of NeoFS name system. +Package ns provides functionality of NeoFS name system. DNS type is designed to resolve NeoFS-related names using Domain Name System: const containerName = "some-container" @@ -19,4 +19,4 @@ NNS type is designed to resolve NeoFS-related names using Neo Name Service: // ... */ -package resolver +package ns diff --git a/resolver/nns.go b/ns/nns.go similarity index 99% rename from resolver/nns.go rename to ns/nns.go index 48db64c..c067d2e 100644 --- a/resolver/nns.go +++ b/ns/nns.go @@ -1,4 +1,4 @@ -package resolver +package ns import ( "context" diff --git a/resolver/nns_test.go b/ns/nns_test.go similarity index 99% rename from resolver/nns_test.go rename to ns/nns_test.go index d95f160..8c6e8cb 100644 --- a/resolver/nns_test.go +++ b/ns/nns_test.go @@ -1,4 +1,4 @@ -package resolver +package ns import ( "errors" diff --git a/resolver/util.go b/ns/util.go similarity index 79% rename from resolver/util.go rename to ns/util.go index 15ba089..88dc246 100644 --- a/resolver/util.go +++ b/ns/util.go @@ -1,4 +1,4 @@ -package resolver +package ns import "errors"