diff --git a/LICENSE b/LICENSE
index bae94e189..028a28dd6 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,661 +1,25 @@
- GNU AFFERO GENERAL PUBLIC LICENSE
- Version 3, 19 November 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU Affero General Public License is a free, copyleft license for
-software and other kinds of works, specifically designed to ensure
-cooperation with the community in the case of network server software.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-our General Public Licenses are intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- Developers that use our General Public Licenses protect your rights
-with two steps: (1) assert copyright on the software, and (2) offer
-you this License which gives you legal permission to copy, distribute
-and/or modify the software.
-
- A secondary benefit of defending all users' freedom is that
-improvements made in alternate versions of the program, if they
-receive widespread use, become available for other developers to
-incorporate. Many developers of free software are heartened and
-encouraged by the resulting cooperation. However, in the case of
-software used on network servers, this result may fail to come about.
-The GNU General Public License permits making a modified version and
-letting the public access it on a server without ever releasing its
-source code to the public.
-
- The GNU Affero General Public License is designed specifically to
-ensure that, in such cases, the modified source code becomes available
-to the community. It requires the operator of a network server to
-provide the source code of the modified version running there to the
-users of that server. Therefore, public use of a modified version, on
-a publicly accessible server, gives the public access to the source
-code of the modified version.
-
- An older license, called the Affero General Public License and
-published by Affero, was designed to accomplish similar goals. This is
-a different license, not a version of the Affero GPL, but Affero has
-released a new version of the Affero GPL which permits relicensing under
-this license.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU Affero General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Remote Network Interaction; Use with the GNU General Public License.
-
- Notwithstanding any other provision of this License, if you modify the
-Program, your modified version must prominently offer all users
-interacting with it remotely through a computer network (if your version
-supports such interaction) an opportunity to receive the Corresponding
-Source of your version by providing access to the Corresponding Source
-from a network server at no charge, through some standard or customary
-means of facilitating copying of software. This Corresponding Source
-shall include the Corresponding Source for any work covered by version 3
-of the GNU General Public License that is incorporated pursuant to the
-following paragraph.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the work with which it is combined will remain governed by version
-3 of the GNU General Public License.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU Affero General Public License from time to time. Such new versions
-will be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU Affero General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU Affero General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU Affero General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero 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 Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-
-Also add information on how to contact you by electronic and paper mail.
-
- If your software can interact with users remotely through a computer
-network, you should also make sure that it provides a way for users to
-get its source. For example, if your program is a web application, its
-interface could display a "Source" link that leads users to an archive
-of the code. There are many ways you could offer source, and different
-solutions will be better for different programs; see section 13 for the
-specific requirements.
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU AGPL, see
-.
\ No newline at end of file
+Copyright (c) 2022-present, DiceDB contributors
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions, and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+3. Neither the name of [Your Name or Organization] nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
diff --git a/Makefile b/Makefile
index 88b6b78ea..56aa160ab 100644
--- a/Makefile
+++ b/Makefile
@@ -81,7 +81,8 @@ format: ## format the code using go fmt
GOLANGCI_LINT_VERSION := 1.60.1
-lint: check-golangci-lint ## run golangci-lint
+lint:
+ gofmt -w .
golangci-lint run ./...
check-golangci-lint:
@@ -109,3 +110,6 @@ release: ## build and push the Docker image to Docker Hub with the latest tag an
push-binary-remote:
$(MAKE) build
scp -i ${SSH_PEM_PATH} ./dicedb ubuntu@${REMOTE_HOST}:.
+
+add-license-notice:
+ ./add_license_notice.sh
diff --git a/README.md b/README.md
index 883703e72..615b16d66 100644
--- a/README.md
+++ b/README.md
@@ -4,6 +4,7 @@ DiceDB
![slatedb.io](https://img.shields.io/badge/site-dicedb.io-00A1FF?style=flat-square)
![Docs](https://img.shields.io/badge/docs-00A1FF?style=flat-square)
+[![License](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)](LICENSE)
DiceDB is an open source, redis-compliant, reactive, scalable, highly available, unified cache optimized for modern hardware.
@@ -196,7 +197,12 @@ Contributors can join the [Discord Server](https://discord.gg/6r8uXWtXh7) for qu
+## License
+
+This project is licensed under the BSD 3-Clause License. See the [LICENSE](LICENSE) file for details.
+
## Troubleshoot
+
### Forcefully killing the process
```
diff --git a/add_license_notice.sh b/add_license_notice.sh
new file mode 100755
index 000000000..aac0490ad
--- /dev/null
+++ b/add_license_notice.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# Define the license notice
+LICENSE_NOTICE="// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information."
+
+# Find all Go files and add the notice if not already present
+find . -type f -name "*.go" | while read -r FILE; do
+ # Check if the file already contains the license notice
+ if ! grep -q "$LICENSE_NOTICE" "$FILE"; then
+ # Add the license notice at the top of the file
+ echo -e "$LICENSE_NOTICE\n\n$(cat "$FILE")" > "$FILE"
+ echo "Added license notice to $FILE"
+ else
+ echo "License notice already present in $FILE"
+ fi
+done
+
+echo "Finished adding license notice to all Go files."
diff --git a/config/config.go b/config/config.go
index 82a4ebcda..54d9622f4 100644
--- a/config/config.go
+++ b/config/config.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package config
diff --git a/config/parser.go b/config/parser.go
index d8107ae75..be1c46617 100644
--- a/config/parser.go
+++ b/config/parser.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package config
diff --git a/config/validator.go b/config/validator.go
index 5a309fb58..34f0b46a6 100644
--- a/config/validator.go
+++ b/config/validator.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package config
diff --git a/examples/leaderboard-go/main.go b/examples/leaderboard-go/main.go
index 65c4e4107..3cf62e09a 100644
--- a/examples/leaderboard-go/main.go
+++ b/examples/leaderboard-go/main.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package main
diff --git a/examples/url-shortener/main.go b/examples/url-shortener/main.go
index a547b8b37..de818eaf1 100644
--- a/examples/url-shortener/main.go
+++ b/examples/url-shortener/main.go
@@ -1,37 +1,24 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package main
import (
"context"
"encoding/json"
- "os"
"fmt"
-
+ "os"
+
"log"
"net/http"
+ "github.com/dicedb/dicedb-go" // DiceDB Go SDK
"github.com/gin-gonic/gin"
"github.com/google/uuid"
- "github.com/dicedb/dicedb-go" // DiceDB Go SDK
)
type URL struct {
- LongURL string `json:"long_url"`
+ LongURL string `json:"long_url"`
}
var db *dicedb.Client
diff --git a/integration_tests/commands/http/append_test.go b/integration_tests/commands/http/append_test.go
index 3fc9881e8..5fee432e6 100644
--- a/integration_tests/commands/http/append_test.go
+++ b/integration_tests/commands/http/append_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/bit_test.go b/integration_tests/commands/http/bit_test.go
index 5934415c9..eebdbf0b2 100644
--- a/integration_tests/commands/http/bit_test.go
+++ b/integration_tests/commands/http/bit_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
@@ -158,7 +145,8 @@ import (
// cmd := tcase.InCmds[i]
// out := tcase.Out[i]
// res, _ := exec.FireCommand(cmd)
-// assert.Equal(t, out, res, "Value mismatch for cmd %s\n.", cmd)
+// assert.Equal(t, out, res, "Value mismatch for cmd %s
+.", cmd)
// }
// }
// }
@@ -317,7 +305,7 @@ import (
// {Command: "BITOP", Body: map[string]interface{}{"values": []interface{}{"NOT", "bazz", "baz"}}},
// {Command: "GET", Body: map[string]interface{}{"key": "bazz"}},
// },
-// expected: []interface{}{"OK", float64(6), "\\x99\\x90\\x90\\x9d\\x9e\\x8d", float64(6), "foobar"},
+// expected: []interface{}{"OK", float64(6), "\x99\x90\x90\x9d\x9e\x8d", float64(6), "foobar"},
// assertType: []string{"equal", "equal", "equal", "equal", "equal"},
// },
// {
@@ -329,7 +317,7 @@ import (
// {Command: "BITOP", Body: map[string]interface{}{"values": []interface{}{"NOT", "bazz", "baz"}}},
// {Command: "GET", Body: map[string]interface{}{"key": "bazz"}},
// },
-// expected: []interface{}{"OK", float64(2), "\\xce\\xcf", float64(2), float64(10)},
+// expected: []interface{}{"OK", float64(2), "\xce\xcf", float64(2), float64(10)},
// assertType: []string{"equal", "equal", "equal", "equal", "equal"},
// },
// {
@@ -361,7 +349,7 @@ import (
// {Command: "BITOP", Body: map[string]interface{}{"values": []interface{}{"AND", "bazz", "foo", "baz"}}},
// {Command: "GET", Body: map[string]interface{}{"key": "bazz"}},
// },
-// expected: []interface{}{"OK", "OK", float64(2), "1\x00"},
+// expected: []interface{}{"OK", "OK", float64(2), "1 "},
// assertType: []string{"equal", "equal", "equal", "equal"},
// },
// {
@@ -372,7 +360,7 @@ import (
// {Command: "BITOP", Body: map[string]interface{}{"values": []interface{}{"AND", "bazzz", "foo", "baz", "bazz"}}},
// {Command: "GET", Body: map[string]interface{}{"key": "bazzz"}},
// },
-// expected: []interface{}{"OK", float64(0), float64(6), "\x00\x00\x00\x00\x00\x00"},
+// expected: []interface{}{"OK", float64(0), float64(6), " "},
// assertType: []string{"equal", "equal", "equal", "equal"},
// },
// {
@@ -408,7 +396,7 @@ import (
// {Command: "BITOP", Body: map[string]interface{}{"values": []interface{}{"OR", "bazzz", "foo", "baz", "bazz"}}},
// {Command: "GET", Body: map[string]interface{}{"key": "bazzz"}},
// },
-// expected: []interface{}{"OK", float64(0), float64(6), "g\xefofev", float64(1), float64(0), float64(7), "goofev@"},
+// expected: []interface{}{"OK", float64(0), float64(6), "gofev", float64(1), float64(0), float64(7), "goofev@"},
// assertType: []string{"equal", "equal", "equal", "equal", "equal", "equal", "equal", "equal"},
// },
// {
@@ -418,7 +406,7 @@ import (
// {Command: "BITOP", Body: map[string]interface{}{"values": []interface{}{"XOR", "bazz", "foo", "baz"}}},
// {Command: "GET", Body: map[string]interface{}{"key": "bazz"}},
// },
-// expected: []interface{}{"OK", float64(6), "\x07\x0d\x0c\x06\x04\x14"},
+// expected: []interface{}{"OK", float64(6), "
"},
// assertType: []string{"equal", "equal", "equal"},
// },
// {
@@ -436,7 +424,7 @@ import (
// {Command: "BITOP", Body: map[string]interface{}{"values": []interface{}{"XOR", "bazzz", "foo", "baz", "bazz"}}},
// {Command: "GET", Body: map[string]interface{}{"key": "bazzz"}},
// },
-// expected: []interface{}{"OK", float64(0), float64(6), "\x07\x8d\x0c\x06\x04\x14", float64(1), float64(0), float64(7), "\x07\r\x0c\x06\x04\x14@", float64(1), float64(7), "\x07\r\x0c\x06\x04\x14\x00"},
+// expected: []interface{}{"OK", float64(0), float64(6), "", float64(1), float64(0), float64(7), "
@", float64(1), float64(7), "
"},
// assertType: []string{"equal", "equal", "equal", "equal", "equal", "equal", "equal", "equal", "equal", "equal", "equal"},
// },
// {
@@ -447,7 +435,7 @@ import (
// {Command: "BITOP", Body: map[string]interface{}{"values": []interface{}{"XOR", "bazz", "foo", "baz"}}},
// {Command: "GET", Body: map[string]interface{}{"key": "bazz"}},
// },
-// expected: []interface{}{"OK", "OK", float64(2), "\x040"},
+// expected: []interface{}{"OK", "OK", float64(2), "0"},
// assertType: []string{"equal", "equal", "equal", "equal"},
// },
// }
@@ -600,7 +588,8 @@ func TestBitCount(t *testing.T) {
cmd := tcase.InCmds[i]
out := tcase.Out[i]
res, _ := exec.FireCommand(cmd)
- assert.Equal(t, out, res, "Value mismatch for cmd %s\n.", cmd)
+ assert.Equal(t, out, res, "Value mismatch for cmd %s
+.", cmd)
}
}
}
@@ -619,133 +608,133 @@ func TestBitPos(t *testing.T) {
}{
{
name: "String interval BIT 0,-1 ",
- val: "\\x00\\xff\\x00",
+ val: "\x00\xff\x00",
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{0, 0, -1, "bit"}}},
out: float64(0),
},
{
name: "String interval BIT 8,-1",
- val: "\\x00\\xff\\x00",
+ val: "\x00\xff\x00",
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{0, 8, -1, "bit"}}},
out: float64(8),
},
{
name: "String interval BIT 16,-1",
- val: "\\x00\\xff\\x00",
+ val: "\x00\xff\x00",
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{0, 16, -1, "bit"}}},
out: float64(16),
},
{
name: "String interval BIT 16,200",
- val: "\\x00\\xff\\x00",
+ val: "\x00\xff\x00",
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{0, 16, 200, "bit"}}},
out: float64(16),
},
{
name: "String interval BIT 8,8",
- val: "\\x00\\xff\\x00",
+ val: "\x00\xff\x00",
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{0, 8, 8, "bit"}}},
out: float64(8),
},
{
name: "FindsFirstZeroBit",
- val: []byte("\xff\xf0\x00"),
+ val: []byte(" "),
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "value": 0}},
out: float64(12),
},
{
name: "FindsFirstOneBit",
- val: []byte("\x00\x0f\xff"),
+ val: []byte(" "),
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "value": 1}},
out: float64(12),
},
{
name: "NoOneBitFound",
- val: "\x00\x00\x00",
+ val: " ",
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "value": 1}},
out: float64(-1),
},
{
name: "NoZeroBitFound",
- val: []byte("\xff\xff\xff"),
+ val: []byte(""),
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "value": 0}},
out: float64(24),
},
{
name: "NoZeroBitFoundWithRangeStartPos",
- val: []byte("\xff\xff\xff"),
+ val: []byte(""),
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{0, 2}}},
out: float64(24),
},
{
name: "NoZeroBitFoundWithOOBRangeStartPos",
- val: []byte("\xff\xff\xff"),
+ val: []byte(""),
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{0, 4}}},
out: float64(-1),
},
{
name: "NoZeroBitFoundWithRange",
- val: []byte("\xff\xff\xff"),
+ val: []byte(""),
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{0, 2, 2}}},
out: float64(-1),
},
{
name: "NoZeroBitFoundWithRangeAndRangeType",
- val: []byte("\xff\xff\xff"),
+ val: []byte(""),
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{0, 2, 2, "BIT"}}},
out: float64(-1),
},
{
name: "FindsFirstZeroBitInRange",
- val: []byte("\xff\xf0\xff"),
+ val: []byte(""),
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{0, 1, 2}}},
out: float64(12),
},
{
name: "FindsFirstOneBitInRange",
- val: "\x00\x00\xf0",
+ val: " ",
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{1, 2, 3}}},
out: float64(16),
},
{
name: "StartGreaterThanEnd",
- val: "\xff\xf0\x00",
+ val: " ",
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{0, 3, 2}}},
out: float64(-1),
},
{
name: "FindsFirstOneBitWithNegativeStart",
- val: []byte("\x00\x00\xf0"),
+ val: []byte(" "),
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{1, -2, -1}}},
out: float64(16),
},
{
name: "FindsFirstZeroBitWithNegativeEnd",
- val: []byte("\xff\xf0\xff"),
+ val: []byte(""),
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{0, 1, -1}}},
out: float64(12),
},
{
name: "FindsFirstZeroBitInByteRange",
- val: []byte("\xff\x00\xff"),
+ val: []byte(" "),
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{0, 1, 2, "BYTE"}}},
out: float64(8),
},
{
name: "FindsFirstOneBitInBitRange",
- val: "\x00\x01\x00",
+ val: " ",
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{1, 0, 16, "BIT"}}},
out: float64(15),
},
{
name: "NoBitFoundInByteRange",
- val: []byte("\xff\xff\xff"),
+ val: []byte(""),
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{0, 0, 2, "BYTE"}}},
out: float64(-1),
},
{
name: "NoBitFoundInBitRange",
- val: "\x00\x00\x00",
+ val: " ",
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{1, 0, 23, "BIT"}}},
out: float64(-1),
},
@@ -763,13 +752,13 @@ func TestBitPos(t *testing.T) {
},
{
name: "SingleByteString",
- val: "\x80",
+ val: "",
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "value": 1}},
out: float64(0),
},
{
name: "RangeExceedsStringLength",
- val: "\x00\xff",
+ val: " ",
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{1, 0, 20, "BIT"}}},
out: float64(8),
},
@@ -834,55 +823,55 @@ func TestBitPos(t *testing.T) {
},
{
name: "BitRangeStartGreaterThanBitLength",
- val: []byte("\xff\xff\xff"),
+ val: []byte(""),
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{0, 25, 30, "BIT"}}},
out: float64(-1),
},
{
name: "BitRangeEndExceedsBitLength",
- val: []byte("\xff\xff\xff"),
+ val: []byte(""),
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{0, 0, 30, "BIT"}}},
out: float64(-1),
},
{
name: "NegativeStartInBitRange",
- val: []byte("\x00\xff\xff"),
+ val: []byte(" "),
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{1, -16, -1, "BIT"}}},
out: float64(8),
},
{
name: "LargeNegativeStart",
- val: []byte("\x00\xff\xff"),
+ val: []byte(" "),
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{1, -100, -1}}},
out: float64(8),
},
{
name: "LargePositiveEnd",
- val: "\x00\xff\xff",
+ val: " ",
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{1, 0, 100}}},
out: float64(8),
},
{
name: "StartAndEndEqualInByteRange",
- val: []byte("\x0f\xff\xff"),
+ val: []byte(""),
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{0, 1, 1, "BYTE"}}},
out: float64(-1),
},
{
name: "StartAndEndEqualInBitRange",
- val: "\x0f\xff\xff",
+ val: "",
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{1, 1, 1, "BIT"}}},
out: float64(-1),
},
{
name: "FindFirstZeroBitInNegativeRange",
- val: []byte("\xff\x00\xff"),
+ val: []byte(" "),
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{0, -2, -1}}},
out: float64(8),
},
{
name: "FindFirstOneBitInNegativeRangeBIT",
- val: []byte("\x00\x00\x80"),
+ val: []byte(" "),
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "values": []interface{}{1, -8, -1, "BIT"}}},
out: float64(16),
},
@@ -900,37 +889,37 @@ func TestBitPos(t *testing.T) {
},
{
name: "SingleBitStringZero",
- val: "\x00",
+ val: " ",
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "value": 1}},
out: float64(-1),
},
{
name: "SingleBitStringOne",
- val: "\x01",
+ val: "",
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "value": 0}},
out: float64(0),
},
{
name: "AllBitsSetExceptLast",
- val: []byte("\xff\xff\xfe"),
+ val: []byte(""),
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "value": 0}},
out: float64(23),
},
{
name: "OnlyLastBitSet",
- val: "\x00\x00\x01",
+ val: " ",
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "value": 1}},
out: float64(23),
},
{
name: "AlternatingBitsLongString",
- val: []byte("\xaa\xaa\xaa\xaa\xaa"),
+ val: []byte(""),
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "value": 0}},
out: float64(1),
},
{
name: "VeryLargeByteString",
- val: []byte(strings.Repeat("\xff", 1000) + "\x00"),
+ val: []byte(strings.Repeat("", 1000) + " "),
inCmd: HTTPCommand{Command: "BITPOS", Body: map[string]interface{}{"key": "testkey", "value": 0}},
out: float64(8000),
},
@@ -986,7 +975,8 @@ func TestBitPos(t *testing.T) {
}
result, _ := exec.FireCommand(tc.inCmd)
- assert.Equal(t, tc.out, result, "Mismatch for cmd %s\n", tc.inCmd)
+ assert.Equal(t, tc.out, result, "Mismatch for cmd %s
+", tc.inCmd)
})
}
}
diff --git a/integration_tests/commands/http/bloom_test.go b/integration_tests/commands/http/bloom_test.go
index f4d323c9a..8d4038473 100644
--- a/integration_tests/commands/http/bloom_test.go
+++ b/integration_tests/commands/http/bloom_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/check_type_test.go b/integration_tests/commands/http/check_type_test.go
index 02e2abd83..60c1d4785 100644
--- a/integration_tests/commands/http/check_type_test.go
+++ b/integration_tests/commands/http/check_type_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/command_count_test.go b/integration_tests/commands/http/command_count_test.go
index 7c9e12e2e..84f876ee3 100644
--- a/integration_tests/commands/http/command_count_test.go
+++ b/integration_tests/commands/http/command_count_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/command_default_test.go b/integration_tests/commands/http/command_default_test.go
index 2b5806364..8d8bbcbfb 100644
--- a/integration_tests/commands/http/command_default_test.go
+++ b/integration_tests/commands/http/command_default_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/command_docs_test.go b/integration_tests/commands/http/command_docs_test.go
index b5cddd097..63b4ee3b4 100644
--- a/integration_tests/commands/http/command_docs_test.go
+++ b/integration_tests/commands/http/command_docs_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
@@ -35,7 +22,14 @@ func TestCommandDocs(t *testing.T) {
string("set"),
[]interface{}{
string("summary"),
- string("SET puts a new pair in db as in the args\n\t\targs must contain key and value.\n\t\targs can also contain multiple options -\n\t\tEX or ex which will set the expiry time(in secs) for the key\n\t\tReturns encoded error response if at least a pair is not part of args\n\t\tReturns encoded error response if expiry tme value in not integer\n\t\tReturns encoded OK RESP once new entry is added\n\t\tIf the key already exists then the value will be overwritten and expiry will be discarded"),
+ string("SET puts a new pair in db as in the args
+ args must contain key and value.
+ args can also contain multiple options -
+ EX or ex which will set the expiry time(in secs) for the key
+ Returns encoded error response if at least a pair is not part of args
+ Returns encoded error response if expiry tme value in not integer
+ Returns encoded OK RESP once new entry is added
+ If the key already exists then the value will be overwritten and expiry will be discarded"),
string("arity"), float64(-3),
string("beginIndex"), float64(1),
string("lastIndex"), float64(0),
@@ -53,7 +47,10 @@ func TestCommandDocs(t *testing.T) {
"get",
[]interface{}{
string("summary"),
- string("GET returns the value for the queried key in args\n\t\tThe key should be the only param in args\n\t\tThe RESP value of the key is encoded and then returned\n\t\tGET returns RespNIL if key is expired or it does not exist"),
+ string("GET returns the value for the queried key in args
+ The key should be the only param in args
+ The RESP value of the key is encoded and then returned
+ GET returns RespNIL if key is expired or it does not exist"),
string("arity"), float64(2),
string("beginIndex"), float64(1),
string("lastIndex"), float64(0),
@@ -94,7 +91,14 @@ func TestCommandDocs(t *testing.T) {
"set",
[]interface{}{
string("summary"),
- string("SET puts a new pair in db as in the args\n\t\targs must contain key and value.\n\t\targs can also contain multiple options -\n\t\tEX or ex which will set the expiry time(in secs) for the key\n\t\tReturns encoded error response if at least a pair is not part of args\n\t\tReturns encoded error response if expiry tme value in not integer\n\t\tReturns encoded OK RESP once new entry is added\n\t\tIf the key already exists then the value will be overwritten and expiry will be discarded"),
+ string("SET puts a new pair in db as in the args
+ args must contain key and value.
+ args can also contain multiple options -
+ EX or ex which will set the expiry time(in secs) for the key
+ Returns encoded error response if at least a pair is not part of args
+ Returns encoded error response if expiry tme value in not integer
+ Returns encoded OK RESP once new entry is added
+ If the key already exists then the value will be overwritten and expiry will be discarded"),
string("arity"), float64(-3),
string("beginIndex"), float64(1),
string("lastIndex"), float64(0),
@@ -111,7 +115,14 @@ func TestCommandDocs(t *testing.T) {
"set",
[]interface{}{
string("summary"),
- string("SET puts a new pair in db as in the args\n\t\targs must contain key and value.\n\t\targs can also contain multiple options -\n\t\tEX or ex which will set the expiry time(in secs) for the key\n\t\tReturns encoded error response if at least a pair is not part of args\n\t\tReturns encoded error response if expiry tme value in not integer\n\t\tReturns encoded OK RESP once new entry is added\n\t\tIf the key already exists then the value will be overwritten and expiry will be discarded"),
+ string("SET puts a new pair in db as in the args
+ args must contain key and value.
+ args can also contain multiple options -
+ EX or ex which will set the expiry time(in secs) for the key
+ Returns encoded error response if at least a pair is not part of args
+ Returns encoded error response if expiry tme value in not integer
+ Returns encoded OK RESP once new entry is added
+ If the key already exists then the value will be overwritten and expiry will be discarded"),
string("arity"), float64(-3),
string("beginIndex"), float64(1),
string("lastIndex"), float64(0),
@@ -120,7 +131,10 @@ func TestCommandDocs(t *testing.T) {
[]interface{}{"get",
[]interface{}{
string("summary"),
- string("GET returns the value for the queried key in args\n\t\tThe key should be the only param in args\n\t\tThe RESP value of the key is encoded and then returned\n\t\tGET returns RespNIL if key is expired or it does not exist"),
+ string("GET returns the value for the queried key in args
+ The key should be the only param in args
+ The RESP value of the key is encoded and then returned
+ GET returns RespNIL if key is expired or it does not exist"),
string("arity"), float64(2),
string("beginIndex"), float64(1),
string("lastIndex"), float64(0),
diff --git a/integration_tests/commands/http/command_getkeys_test.go b/integration_tests/commands/http/command_getkeys_test.go
index 9d5f52846..d0c986c32 100644
--- a/integration_tests/commands/http/command_getkeys_test.go
+++ b/integration_tests/commands/http/command_getkeys_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/command_help_test.go b/integration_tests/commands/http/command_help_test.go
index b047fb365..fa09fdb3f 100644
--- a/integration_tests/commands/http/command_help_test.go
+++ b/integration_tests/commands/http/command_help_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/command_info_test.go b/integration_tests/commands/http/command_info_test.go
index 4b9da0479..1302ce502 100644
--- a/integration_tests/commands/http/command_info_test.go
+++ b/integration_tests/commands/http/command_info_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/command_list_test.go b/integration_tests/commands/http/command_list_test.go
index 40c344a7f..444813fca 100644
--- a/integration_tests/commands/http/command_list_test.go
+++ b/integration_tests/commands/http/command_list_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/command_rename_test.go b/integration_tests/commands/http/command_rename_test.go
index 0411c5e4b..fcaefa8ef 100644
--- a/integration_tests/commands/http/command_rename_test.go
+++ b/integration_tests/commands/http/command_rename_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
//go:build ignore
// +build ignore
diff --git a/integration_tests/commands/http/copy_test.go b/integration_tests/commands/http/copy_test.go
index 91fec81d1..c568f9f76 100644
--- a/integration_tests/commands/http/copy_test.go
+++ b/integration_tests/commands/http/copy_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
//go:build ignore
// +build ignore
diff --git a/integration_tests/commands/http/countminsketch_test.go b/integration_tests/commands/http/countminsketch_test.go
index 4b9a739cd..9bd56df3f 100644
--- a/integration_tests/commands/http/countminsketch_test.go
+++ b/integration_tests/commands/http/countminsketch_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/dbsize_test.go b/integration_tests/commands/http/dbsize_test.go
index dc436ce40..2301f5904 100644
--- a/integration_tests/commands/http/dbsize_test.go
+++ b/integration_tests/commands/http/dbsize_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
//go:build ignore
// +build ignore
diff --git a/integration_tests/commands/http/decr_test.go b/integration_tests/commands/http/decr_test.go
index d5d933ae6..701c20c51 100644
--- a/integration_tests/commands/http/decr_test.go
+++ b/integration_tests/commands/http/decr_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/del_test.go b/integration_tests/commands/http/del_test.go
index a189942ba..73bf26040 100644
--- a/integration_tests/commands/http/del_test.go
+++ b/integration_tests/commands/http/del_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/deque_test.go b/integration_tests/commands/http/deque_test.go
index 562a249e6..6e421fac3 100644
--- a/integration_tests/commands/http/deque_test.go
+++ b/integration_tests/commands/http/deque_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/echo_test.go b/integration_tests/commands/http/echo_test.go
index 260499aa7..9fc29d97a 100644
--- a/integration_tests/commands/http/echo_test.go
+++ b/integration_tests/commands/http/echo_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/exists_test.go b/integration_tests/commands/http/exists_test.go
index 160378793..8fe5a7b23 100644
--- a/integration_tests/commands/http/exists_test.go
+++ b/integration_tests/commands/http/exists_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/expire_test.go b/integration_tests/commands/http/expire_test.go
index 029e7aa2f..0a75791b9 100644
--- a/integration_tests/commands/http/expire_test.go
+++ b/integration_tests/commands/http/expire_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/expireat_test.go b/integration_tests/commands/http/expireat_test.go
index a9ef6dc72..d5567afa0 100644
--- a/integration_tests/commands/http/expireat_test.go
+++ b/integration_tests/commands/http/expireat_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/expiretime_test.go b/integration_tests/commands/http/expiretime_test.go
index 49421decd..2451b3c76 100644
--- a/integration_tests/commands/http/expiretime_test.go
+++ b/integration_tests/commands/http/expiretime_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/geo_test.go b/integration_tests/commands/http/geo_test.go
index 83eae012e..32da20041 100644
--- a/integration_tests/commands/http/geo_test.go
+++ b/integration_tests/commands/http/geo_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/get_test.go b/integration_tests/commands/http/get_test.go
index d66e0429b..fb19a7e4c 100644
--- a/integration_tests/commands/http/get_test.go
+++ b/integration_tests/commands/http/get_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/getdel_test.go b/integration_tests/commands/http/getdel_test.go
index fca983230..faf59eea1 100644
--- a/integration_tests/commands/http/getdel_test.go
+++ b/integration_tests/commands/http/getdel_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/getex_test.go b/integration_tests/commands/http/getex_test.go
index e232e3286..26aae9a0b 100644
--- a/integration_tests/commands/http/getex_test.go
+++ b/integration_tests/commands/http/getex_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/getrange_test.go b/integration_tests/commands/http/getrange_test.go
index dc47b8145..9d52867a3 100644
--- a/integration_tests/commands/http/getrange_test.go
+++ b/integration_tests/commands/http/getrange_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/getset_test.go b/integration_tests/commands/http/getset_test.go
index 60fc7a58c..089519651 100644
--- a/integration_tests/commands/http/getset_test.go
+++ b/integration_tests/commands/http/getset_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/hdel_test.go b/integration_tests/commands/http/hdel_test.go
index 81e76a5aa..bc9205cf3 100644
--- a/integration_tests/commands/http/hdel_test.go
+++ b/integration_tests/commands/http/hdel_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/hexists_test.go b/integration_tests/commands/http/hexists_test.go
index 116bc8052..055031408 100644
--- a/integration_tests/commands/http/hexists_test.go
+++ b/integration_tests/commands/http/hexists_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/hget_test.go b/integration_tests/commands/http/hget_test.go
index b607d1ac6..a948c5ba5 100644
--- a/integration_tests/commands/http/hget_test.go
+++ b/integration_tests/commands/http/hget_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/hincrby_test.go b/integration_tests/commands/http/hincrby_test.go
index 9eca44c51..eeecc064f 100644
--- a/integration_tests/commands/http/hincrby_test.go
+++ b/integration_tests/commands/http/hincrby_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/hincrbyfloat_test.go b/integration_tests/commands/http/hincrbyfloat_test.go
index a715cca55..13eb61997 100644
--- a/integration_tests/commands/http/hincrbyfloat_test.go
+++ b/integration_tests/commands/http/hincrbyfloat_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/hkeys_test.go b/integration_tests/commands/http/hkeys_test.go
index 4c8acc475..ab947aaa5 100644
--- a/integration_tests/commands/http/hkeys_test.go
+++ b/integration_tests/commands/http/hkeys_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/hlen_test.go b/integration_tests/commands/http/hlen_test.go
index 42bb113be..53f02dc76 100644
--- a/integration_tests/commands/http/hlen_test.go
+++ b/integration_tests/commands/http/hlen_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/hrandfield_test.go b/integration_tests/commands/http/hrandfield_test.go
index 74d6945fd..d95fe7699 100644
--- a/integration_tests/commands/http/hrandfield_test.go
+++ b/integration_tests/commands/http/hrandfield_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/hscan_test.go b/integration_tests/commands/http/hscan_test.go
index 690a8db2c..fc4482ff0 100644
--- a/integration_tests/commands/http/hscan_test.go
+++ b/integration_tests/commands/http/hscan_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/hset_test.go b/integration_tests/commands/http/hset_test.go
index baeb4beb3..a9054e782 100644
--- a/integration_tests/commands/http/hset_test.go
+++ b/integration_tests/commands/http/hset_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/hsetnx_test.go b/integration_tests/commands/http/hsetnx_test.go
index 84760e619..e606c723d 100644
--- a/integration_tests/commands/http/hsetnx_test.go
+++ b/integration_tests/commands/http/hsetnx_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/hstrlen_test.go b/integration_tests/commands/http/hstrlen_test.go
index 602d23fe1..1530157be 100644
--- a/integration_tests/commands/http/hstrlen_test.go
+++ b/integration_tests/commands/http/hstrlen_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/hvals_test.go b/integration_tests/commands/http/hvals_test.go
index 04eca2d32..488040a65 100644
--- a/integration_tests/commands/http/hvals_test.go
+++ b/integration_tests/commands/http/hvals_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/hyperloglog_test.go b/integration_tests/commands/http/hyperloglog_test.go
index ccb5a43fd..c29797d6a 100644
--- a/integration_tests/commands/http/hyperloglog_test.go
+++ b/integration_tests/commands/http/hyperloglog_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
//go:build ignore
// +build ignore
diff --git a/integration_tests/commands/http/incr_by_float_test.go b/integration_tests/commands/http/incr_by_float_test.go
index 110c18113..db5480f5a 100644
--- a/integration_tests/commands/http/incr_by_float_test.go
+++ b/integration_tests/commands/http/incr_by_float_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/incr_test.go b/integration_tests/commands/http/incr_test.go
index 407f22368..dc603a2b5 100644
--- a/integration_tests/commands/http/incr_test.go
+++ b/integration_tests/commands/http/incr_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/json_arrpop_test.go b/integration_tests/commands/http/json_arrpop_test.go
index 8493b9d4f..f58981022 100644
--- a/integration_tests/commands/http/json_arrpop_test.go
+++ b/integration_tests/commands/http/json_arrpop_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/json_test.go b/integration_tests/commands/http/json_test.go
index 7fca34497..5b766995e 100644
--- a/integration_tests/commands/http/json_test.go
+++ b/integration_tests/commands/http/json_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
@@ -89,7 +76,7 @@ func TestJSONOperations(t *testing.T) {
nestedJsonString := `{"name":"Alice","address":{"city":"New York","zip":"10001"},"array":[1,2,3,4,5]}`
specialCharsJsonString := `{"key":"value with spaces","emoji":"😀"}`
unicodeJsonString := `{"unicode":"こんにちは世界"}`
- escapedCharsJsonString := `{"escaped":"\"quoted\", \\backslash\\ and /forward/slash"}`
+ escapedCharsJsonString := `{"escaped":"\"quoted\", \backslash\ and /forward/slash"}`
complexJsonString := `{"inventory":{"mountain_bikes":[{"id":"bike:1","model":"Phoebe","price":1920,"specs":{"material":"carbon","weight":13.1},"colors":["black","silver"]},{"id":"bike:2","model":"Quaoar","price":2072,"specs":{"material":"aluminium","weight":7.9},"colors":["black","white"]},{"id":"bike:3","model":"Weywot","price":3264,"specs":{"material":"alloy","weight":13.8}}],"commuter_bikes":[{"id":"bike:4","model":"Salacia","price":1475,"specs":{"material":"aluminium","weight":16.6},"colors":["black","silver"]},{"id":"bike:5","model":"Mimas","price":3941,"specs":{"material":"alloy","weight":11.6}}]}}`
var simpleJson map[string]interface{}
diff --git a/integration_tests/commands/http/jsondebug_test.go b/integration_tests/commands/http/jsondebug_test.go
index 0bc197746..f33f8c7b7 100644
--- a/integration_tests/commands/http/jsondebug_test.go
+++ b/integration_tests/commands/http/jsondebug_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/jsonresp_test.go b/integration_tests/commands/http/jsonresp_test.go
index e0f2be2b6..5fbab69e8 100644
--- a/integration_tests/commands/http/jsonresp_test.go
+++ b/integration_tests/commands/http/jsonresp_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/keys_test.go b/integration_tests/commands/http/keys_test.go
index a23136259..8136d89b2 100644
--- a/integration_tests/commands/http/keys_test.go
+++ b/integration_tests/commands/http/keys_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
//go:build ignore
// +build ignore
diff --git a/integration_tests/commands/http/main_test.go b/integration_tests/commands/http/main_test.go
index b2c5ac3f9..f31d94e37 100644
--- a/integration_tests/commands/http/main_test.go
+++ b/integration_tests/commands/http/main_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/mget_test.go b/integration_tests/commands/http/mget_test.go
index 01d68507a..0711c9a9c 100644
--- a/integration_tests/commands/http/mget_test.go
+++ b/integration_tests/commands/http/mget_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
//go:build ignore
// +build ignore
diff --git a/integration_tests/commands/http/mset_test.go b/integration_tests/commands/http/mset_test.go
index 4383f6e99..3ecba50e8 100644
--- a/integration_tests/commands/http/mset_test.go
+++ b/integration_tests/commands/http/mset_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
//go:build ignore
// +build ignore
diff --git a/integration_tests/commands/http/object_test.go b/integration_tests/commands/http/object_test.go
index db9d5293a..975403f1b 100644
--- a/integration_tests/commands/http/object_test.go
+++ b/integration_tests/commands/http/object_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
//go:build ignore
// +build ignore
diff --git a/integration_tests/commands/http/set_data_cmd_test.go b/integration_tests/commands/http/set_data_cmd_test.go
index 561347020..255526647 100644
--- a/integration_tests/commands/http/set_data_cmd_test.go
+++ b/integration_tests/commands/http/set_data_cmd_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/set_test.go b/integration_tests/commands/http/set_test.go
index 6c1803196..5b23b1b36 100644
--- a/integration_tests/commands/http/set_test.go
+++ b/integration_tests/commands/http/set_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/setup.go b/integration_tests/commands/http/setup.go
index 9cc696f9a..39b1c0972 100644
--- a/integration_tests/commands/http/setup.go
+++ b/integration_tests/commands/http/setup.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/touch_test.go b/integration_tests/commands/http/touch_test.go
index 7133069e1..866a6e84a 100644
--- a/integration_tests/commands/http/touch_test.go
+++ b/integration_tests/commands/http/touch_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
//go:build ignore
// +build ignore
diff --git a/integration_tests/commands/http/ttl_pttl_test.go b/integration_tests/commands/http/ttl_pttl_test.go
index dffb88c9c..d1bbd334e 100644
--- a/integration_tests/commands/http/ttl_pttl_test.go
+++ b/integration_tests/commands/http/ttl_pttl_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/type_test.go b/integration_tests/commands/http/type_test.go
index 43a04f02b..287056c0e 100644
--- a/integration_tests/commands/http/type_test.go
+++ b/integration_tests/commands/http/type_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/zcard_test.go b/integration_tests/commands/http/zcard_test.go
index b729be37c..c269fb629 100644
--- a/integration_tests/commands/http/zcard_test.go
+++ b/integration_tests/commands/http/zcard_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/zpopmax_test.go b/integration_tests/commands/http/zpopmax_test.go
index 79ac01bd9..37b0019fc 100644
--- a/integration_tests/commands/http/zpopmax_test.go
+++ b/integration_tests/commands/http/zpopmax_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/zrank_test.go b/integration_tests/commands/http/zrank_test.go
index 7f8c00665..98b230712 100644
--- a/integration_tests/commands/http/zrank_test.go
+++ b/integration_tests/commands/http/zrank_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/zrem_test.go b/integration_tests/commands/http/zrem_test.go
index 7105efe41..dc9efa803 100644
--- a/integration_tests/commands/http/zrem_test.go
+++ b/integration_tests/commands/http/zrem_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/http/zset_test.go b/integration_tests/commands/http/zset_test.go
index 8ce42cb6b..a077379fa 100644
--- a/integration_tests/commands/http/zset_test.go
+++ b/integration_tests/commands/http/zset_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package http
diff --git a/integration_tests/commands/resp/abort/server_abort_test.go b/integration_tests/commands/resp/abort/server_abort_test.go
index 0bafdaa2e..69fbb6f62 100644
--- a/integration_tests/commands/resp/abort/server_abort_test.go
+++ b/integration_tests/commands/resp/abort/server_abort_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package abort
diff --git a/integration_tests/commands/resp/append_test.go b/integration_tests/commands/resp/append_test.go
index 4b6aa1a81..5d5551dd5 100644
--- a/integration_tests/commands/resp/append_test.go
+++ b/integration_tests/commands/resp/append_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/bit_test.go b/integration_tests/commands/resp/bit_test.go
index db14a4a9d..adec1d630 100644
--- a/integration_tests/commands/resp/bit_test.go
+++ b/integration_tests/commands/resp/bit_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
@@ -94,7 +81,8 @@ import (
// for i := 0; i < len(tcase.InCmds); i++ {
// cmd := tcase.InCmds[i]
// out := tcase.Out[i]
-// assert.Equal(t, out, FireCommand(conn, cmd), "Value mismatch for cmd %s\n.", cmd)
+// assert.Equal(t, out, FireCommand(conn, cmd), "Value mismatch for cmd %s
+.", cmd)
// }
// }
// }
@@ -185,13 +173,13 @@ import (
// {
// name: "Bitop not of a key containing a string",
// cmds: []string{"SET foo foobar", "BITOP NOT baz foo", "GET baz", "BITOP NOT bazz baz", "GET bazz"},
-// expected: []interface{}{"OK", int64(6), "\x99\x90\x90\x9d\x9e\x8d", int64(6), "foobar"},
+// expected: []interface{}{"OK", int64(6), "", int64(6), "foobar"},
// assertType: []string{"equal", "equal", "equal", "equal", "equal"},
// },
// {
// name: "Bitop not of a key containing an integer",
// cmds: []string{"SET foo 10", "BITOP NOT baz foo", "GET baz", "BITOP NOT bazz baz", "GET bazz"},
-// expected: []interface{}{"OK", int64(2), "\xce\xcf", int64(2), int64(10)},
+// expected: []interface{}{"OK", int64(2), "", int64(2), int64(10)},
// assertType: []string{"equal", "equal", "equal", "equal", "equal"},
// },
// {
@@ -209,13 +197,13 @@ import (
// {
// name: "BITOP AND of keys containing integers and get the destkey",
// cmds: []string{"SET foo 10", "SET baz 5", "BITOP AND bazz foo baz", "GET bazz"},
-// expected: []interface{}{"OK", "OK", int64(2), "1\x00"},
+// expected: []interface{}{"OK", "OK", int64(2), "1 "},
// assertType: []string{"equal", "equal", "equal", "equal"},
// },
// {
// name: "Bitop or of keys containing a string, a bytearray and get the destkey",
// cmds: []string{"MSET foo foobar baz abcdef", "SETBIT bazz 8 1", "BITOP and bazzz foo baz bazz", "GET bazzz"},
-// expected: []interface{}{"OK", int64(0), int64(6), "\x00\x00\x00\x00\x00\x00"},
+// expected: []interface{}{"OK", int64(0), int64(6), " "},
// assertType: []string{"equal", "equal", "equal", "equal"},
// },
// {
@@ -233,25 +221,25 @@ import (
// {
// name: "BITOP OR of keys containing strings and a bytearray and get the destkey",
// cmds: []string{"MSET foo foobar baz abcdef", "SETBIT bazz 8 1", "BITOP OR bazzz foo baz bazz", "GET bazzz", "SETBIT bazz 8 0", "SETBIT bazz 49 1", "BITOP OR bazzz foo baz bazz", "GET bazzz"},
-// expected: []interface{}{"OK", int64(0), int64(6), "g\xefofev", int64(1), int64(0), int64(7), "goofev@"},
+// expected: []interface{}{"OK", int64(0), int64(6), "gofev", int64(1), int64(0), int64(7), "goofev@"},
// assertType: []string{"equal", "equal", "equal", "equal", "equal", "equal", "equal", "equal"},
// },
// {
// name: "BITOP XOR of keys containing strings and get the destkey",
// cmds: []string{"MSET foo foobar baz abcdef", "BITOP XOR bazz foo baz", "GET bazz"},
-// expected: []interface{}{"OK", int64(6), "\x07\x0d\x0c\x06\x04\x14"},
+// expected: []interface{}{"OK", int64(6), "
"},
// assertType: []string{"equal", "equal", "equal"},
// },
// {
// name: "BITOP XOR of keys containing strings and a bytearray and get the destkey",
// cmds: []string{"MSET foo foobar baz abcdef", "SETBIT bazz 8 1", "BITOP XOR bazzz foo baz bazz", "GET bazzz", "SETBIT bazz 8 0", "SETBIT bazz 49 1", "BITOP XOR bazzz foo baz bazz", "GET bazzz", "Setbit bazz 49 0", "BITOP XOR bazzz foo baz bazz", "GET bazzz"},
-// expected: []interface{}{"OK", int64(0), int64(6), "\x07\x8d\x0c\x06\x04\x14", int64(1), int64(0), int64(7), "\x07\r\x0c\x06\x04\x14@", int64(1), int64(7), "\x07\r\x0c\x06\x04\x14\x00"},
+// expected: []interface{}{"OK", int64(0), int64(6), "", int64(1), int64(0), int64(7), "
@", int64(1), int64(7), "
"},
// assertType: []string{"equal", "equal", "equal", "equal", "equal", "equal", "equal", "equal", "equal", "equal", "equal"},
// },
// {
// name: "BITOP XOR of keys containing integers and get the destkey",
// cmds: []string{"SET foo 10", "SET baz 5", "BITOP XOR bazz foo baz", "GET bazz"},
-// expected: []interface{}{"OK", "OK", int64(2), "\x040"},
+// expected: []interface{}{"OK", "OK", int64(2), "0"},
// assertType: []string{"equal", "equal", "equal", "equal"},
// },
// }
@@ -366,7 +354,8 @@ func TestBitCount(t *testing.T) {
for i := 0; i < len(tcase.InCmds); i++ {
cmd := tcase.InCmds[i]
out := tcase.Out[i]
- assert.Equal(t, out, FireCommand(conn, cmd), "Value mismatch for cmd %s\n.", cmd)
+ assert.Equal(t, out, FireCommand(conn, cmd), "Value mismatch for cmd %s
+.", cmd)
}
}
}
@@ -383,133 +372,133 @@ func TestBitPos(t *testing.T) {
}{
{
name: "String interval BIT 0,-1 ",
- val: "\\x00\\xff\\x00",
+ val: "\x00\xff\x00",
inCmd: "BITPOS testkey 0 0 -1 bit",
out: int64(0),
},
{
name: "String interval BIT 8,-1",
- val: "\\x00\\xff\\x00",
+ val: "\x00\xff\x00",
inCmd: "BITPOS testkey 0 8 -1 bit",
out: int64(8),
},
{
name: "String interval BIT 16,-1",
- val: "\\x00\\xff\\x00",
+ val: "\x00\xff\x00",
inCmd: "BITPOS testkey 0 16 -1 bit",
out: int64(16),
},
{
name: "String interval BIT 16,200",
- val: "\\x00\\xff\\x00",
+ val: "\x00\xff\x00",
inCmd: "BITPOS testkey 0 16 200 bit",
out: int64(16),
},
{
name: "String interval BIT 8,8",
- val: "\\x00\\xff\\x00",
+ val: "\x00\xff\x00",
inCmd: "BITPOS testkey 0 8 8 bit",
out: int64(8),
},
{
name: "FindsFirstZeroBit",
- val: "\xff\xf0\x00",
+ val: " ",
inCmd: "BITPOS testkey 0",
out: int64(12),
},
{
name: "FindsFirstOneBit",
- val: "\x00\x0f\xff",
+ val: " ",
inCmd: "BITPOS testkey 1",
out: int64(12),
},
{
name: "NoOneBitFound",
- val: "\x00\x00\x00",
+ val: " ",
inCmd: "BITPOS testkey 1",
out: int64(-1),
},
{
name: "NoZeroBitFound",
- val: "\xff\xff\xff",
+ val: "",
inCmd: "BITPOS testkey 0",
out: int64(24),
},
{
name: "NoZeroBitFoundWithRangeStartPos",
- val: "\xff\xff\xff",
+ val: "",
inCmd: "BITPOS testkey 0 2",
out: int64(24),
},
{
name: "NoZeroBitFoundWithOOBRangeStartPos",
- val: "\xff\xff\xff",
+ val: "",
inCmd: "BITPOS testkey 0 4",
out: int64(-1),
},
{
name: "NoZeroBitFoundWithRange",
- val: "\xff\xff\xff",
+ val: "",
inCmd: "BITPOS testkey 0 2 2",
out: int64(-1),
},
{
name: "NoZeroBitFoundWithRangeAndRangeType",
- val: "\xff\xff\xff",
+ val: "",
inCmd: "BITPOS testkey 0 2 2 BIT",
out: int64(-1),
},
{
name: "FindsFirstZeroBitInRange",
- val: "\xff\xf0\xff",
+ val: "",
inCmd: "BITPOS testkey 0 1 2",
out: int64(12),
},
{
name: "FindsFirstOneBitInRange",
- val: "\x00\x00\xf0",
+ val: " ",
inCmd: "BITPOS testkey 1 2 3",
out: int64(16),
},
{
name: "StartGreaterThanEnd",
- val: "\xff\xf0\x00",
+ val: " ",
inCmd: "BITPOS testkey 0 3 2",
out: int64(-1),
},
{
name: "FindsFirstOneBitWithNegativeStart",
- val: "\x00\x00\xf0",
+ val: " ",
inCmd: "BITPOS testkey 1 -2 -1",
out: int64(16),
},
{
name: "FindsFirstZeroBitWithNegativeEnd",
- val: "\xff\xf0\xff",
+ val: "",
inCmd: "BITPOS testkey 0 1 -1",
out: int64(12),
},
{
name: "FindsFirstZeroBitInByteRange",
- val: "\xff\x00\xff",
+ val: " ",
inCmd: "BITPOS testkey 0 1 2 BYTE",
out: int64(8),
},
{
name: "FindsFirstOneBitInBitRange",
- val: "\x00\x01\x00",
+ val: " ",
inCmd: "BITPOS testkey 1 0 16 BIT",
out: int64(15),
},
{
name: "NoBitFoundInByteRange",
- val: "\xff\xff\xff",
+ val: "",
inCmd: "BITPOS testkey 0 0 2 BYTE",
out: int64(-1),
},
{
name: "NoBitFoundInBitRange",
- val: "\x00\x00\x00",
+ val: " ",
inCmd: "BITPOS testkey 1 0 23 BIT",
out: int64(-1),
},
@@ -527,13 +516,13 @@ func TestBitPos(t *testing.T) {
},
{
name: "SingleByteString",
- val: "\x80",
+ val: "",
inCmd: "BITPOS testkey 1",
out: int64(0),
},
{
name: "RangeExceedsStringLength",
- val: "\x00\xff",
+ val: " ",
inCmd: "BITPOS testkey 1 0 20 BIT",
out: int64(8),
},
@@ -598,55 +587,55 @@ func TestBitPos(t *testing.T) {
},
{
name: "BitRangeStartGreaterThanBitLength",
- val: "\xff\xff\xff",
+ val: "",
inCmd: "BITPOS testkey 0 25 30 BIT",
out: int64(-1),
},
{
name: "BitRangeEndExceedsBitLength",
- val: "\xff\xff\xff",
+ val: "",
inCmd: "BITPOS testkey 0 0 30 BIT",
out: int64(-1),
},
{
name: "NegativeStartInBitRange",
- val: "\x00\xff\xff",
+ val: " ",
inCmd: "BITPOS testkey 1 -16 -1 BIT",
out: int64(8),
},
{
name: "LargeNegativeStart",
- val: "\x00\xff\xff",
+ val: " ",
inCmd: "BITPOS testkey 1 -100 -1",
out: int64(8),
},
{
name: "LargePositiveEnd",
- val: "\x00\xff\xff",
+ val: " ",
inCmd: "BITPOS testkey 1 0 100",
out: int64(8),
},
{
name: "StartAndEndEqualInByteRange",
- val: "\x0f\xff\xff",
+ val: "",
inCmd: "BITPOS testkey 0 1 1 BYTE",
out: int64(-1),
},
{
name: "StartAndEndEqualInBitRange",
- val: "\x0f\xff\xff",
+ val: "",
inCmd: "BITPOS testkey 1 1 1 BIT",
out: int64(-1),
},
{
name: "FindFirstZeroBitInNegativeRange",
- val: "\xff\x00\xff",
+ val: " ",
inCmd: "BITPOS testkey 0 -2 -1",
out: int64(8),
},
{
name: "FindFirstOneBitInNegativeRangeBIT",
- val: "\x00\x00\x80",
+ val: " ",
inCmd: "BITPOS testkey 1 -8 -1 BIT",
out: int64(16),
},
@@ -664,37 +653,37 @@ func TestBitPos(t *testing.T) {
},
{
name: "SingleBitStringZero",
- val: "\x00",
+ val: " ",
inCmd: "BITPOS testkey 1",
out: int64(-1),
},
{
name: "SingleBitStringOne",
- val: "\x01",
+ val: "",
inCmd: "BITPOS testkey 0",
out: int64(0),
},
{
name: "AllBitsSetExceptLast",
- val: "\xff\xff\xfe",
+ val: "",
inCmd: "BITPOS testkey 0",
out: int64(23),
},
{
name: "OnlyLastBitSet",
- val: "\x00\x00\x01",
+ val: " ",
inCmd: "BITPOS testkey 1",
out: int64(23),
},
{
name: "AlternatingBitsLongString",
- val: "\xaa\xaa\xaa\xaa\xaa",
+ val: "",
inCmd: "BITPOS testkey 0",
out: int64(1),
},
{
name: "VeryLargeByteString",
- val: strings.Repeat("\xff", 1000) + "\x00",
+ val: strings.Repeat("", 1000) + " ",
inCmd: "BITPOS testkey 0",
out: int64(8000),
},
@@ -736,7 +725,8 @@ func TestBitPos(t *testing.T) {
}
result := FireCommand(conn, tc.inCmd)
- assert.Equal(t, tc.out, result, "Mismatch for cmd %s\n", tc.inCmd)
+ assert.Equal(t, tc.out, result, "Mismatch for cmd %s
+", tc.inCmd)
})
}
}
diff --git a/integration_tests/commands/resp/bloom_test.go b/integration_tests/commands/resp/bloom_test.go
index 14e6f2f4e..42d86f4cd 100644
--- a/integration_tests/commands/resp/bloom_test.go
+++ b/integration_tests/commands/resp/bloom_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/check_type_test.go b/integration_tests/commands/resp/check_type_test.go
index b3d280f0d..516912d71 100644
--- a/integration_tests/commands/resp/check_type_test.go
+++ b/integration_tests/commands/resp/check_type_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/command_count_test.go b/integration_tests/commands/resp/command_count_test.go
index 33b4dcaf0..2c4d3c13a 100644
--- a/integration_tests/commands/resp/command_count_test.go
+++ b/integration_tests/commands/resp/command_count_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/command_default_test.go b/integration_tests/commands/resp/command_default_test.go
index 543100005..37591ad03 100644
--- a/integration_tests/commands/resp/command_default_test.go
+++ b/integration_tests/commands/resp/command_default_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/command_docs_test.go b/integration_tests/commands/resp/command_docs_test.go
index a344c69e0..1529d665f 100644
--- a/integration_tests/commands/resp/command_docs_test.go
+++ b/integration_tests/commands/resp/command_docs_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
@@ -33,7 +20,14 @@ var getDocsTestCases = []struct {
"set",
[]interface{}{
"summary",
- string("SET puts a new pair in db as in the args\n\t\targs must contain key and value.\n\t\targs can also contain multiple options -\n\t\tEX or ex which will set the expiry time(in secs) for the key\n\t\tReturns encoded error response if at least a pair is not part of args\n\t\tReturns encoded error response if expiry tme value in not integer\n\t\tReturns encoded OK RESP once new entry is added\n\t\tIf the key already exists then the value will be overwritten and expiry will be discarded"),
+ string("SET puts a new pair in db as in the args
+ args must contain key and value.
+ args can also contain multiple options -
+ EX or ex which will set the expiry time(in secs) for the key
+ Returns encoded error response if at least a pair is not part of args
+ Returns encoded error response if expiry tme value in not integer
+ Returns encoded OK RESP once new entry is added
+ If the key already exists then the value will be overwritten and expiry will be discarded"),
"arity", int64(-3),
"beginIndex", int64(1),
"lastIndex", int64(0),
@@ -44,7 +38,10 @@ var getDocsTestCases = []struct {
"get",
[]interface{}{
"summary",
- string("GET returns the value for the queried key in args\n\t\tThe key should be the only param in args\n\t\tThe RESP value of the key is encoded and then returned\n\t\tGET returns RespNIL if key is expired or it does not exist"),
+ string("GET returns the value for the queried key in args
+ The key should be the only param in args
+ The RESP value of the key is encoded and then returned
+ GET returns RespNIL if key is expired or it does not exist"),
"arity", int64(2),
"beginIndex", int64(1),
"lastIndex", int64(0),
@@ -70,7 +67,14 @@ var getDocsTestCases = []struct {
"set",
[]interface{}{
"summary",
- string("SET puts a new pair in db as in the args\n\t\targs must contain key and value.\n\t\targs can also contain multiple options -\n\t\tEX or ex which will set the expiry time(in secs) for the key\n\t\tReturns encoded error response if at least a pair is not part of args\n\t\tReturns encoded error response if expiry tme value in not integer\n\t\tReturns encoded OK RESP once new entry is added\n\t\tIf the key already exists then the value will be overwritten and expiry will be discarded"),
+ string("SET puts a new pair in db as in the args
+ args must contain key and value.
+ args can also contain multiple options -
+ EX or ex which will set the expiry time(in secs) for the key
+ Returns encoded error response if at least a pair is not part of args
+ Returns encoded error response if expiry tme value in not integer
+ Returns encoded OK RESP once new entry is added
+ If the key already exists then the value will be overwritten and expiry will be discarded"),
"arity", int64(-3),
"beginIndex", int64(1),
"lastIndex", int64(0),
@@ -80,7 +84,14 @@ var getDocsTestCases = []struct {
"set",
[]interface{}{
"summary",
- string("SET puts a new pair in db as in the args\n\t\targs must contain key and value.\n\t\targs can also contain multiple options -\n\t\tEX or ex which will set the expiry time(in secs) for the key\n\t\tReturns encoded error response if at least a pair is not part of args\n\t\tReturns encoded error response if expiry tme value in not integer\n\t\tReturns encoded OK RESP once new entry is added\n\t\tIf the key already exists then the value will be overwritten and expiry will be discarded"),
+ string("SET puts a new pair in db as in the args
+ args must contain key and value.
+ args can also contain multiple options -
+ EX or ex which will set the expiry time(in secs) for the key
+ Returns encoded error response if at least a pair is not part of args
+ Returns encoded error response if expiry tme value in not integer
+ Returns encoded OK RESP once new entry is added
+ If the key already exists then the value will be overwritten and expiry will be discarded"),
"arity", int64(-3),
"beginIndex", int64(1),
"lastIndex", int64(0),
@@ -89,7 +100,10 @@ var getDocsTestCases = []struct {
[]interface{}{"get",
[]interface{}{
"summary",
- string("GET returns the value for the queried key in args\n\t\tThe key should be the only param in args\n\t\tThe RESP value of the key is encoded and then returned\n\t\tGET returns RespNIL if key is expired or it does not exist"),
+ string("GET returns the value for the queried key in args
+ The key should be the only param in args
+ The RESP value of the key is encoded and then returned
+ GET returns RespNIL if key is expired or it does not exist"),
"arity", int64(2),
"beginIndex", int64(1),
"lastIndex", int64(0),
diff --git a/integration_tests/commands/resp/command_getkeys_test.go b/integration_tests/commands/resp/command_getkeys_test.go
index 228fe409c..68b1e3700 100644
--- a/integration_tests/commands/resp/command_getkeys_test.go
+++ b/integration_tests/commands/resp/command_getkeys_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/command_info_test.go b/integration_tests/commands/resp/command_info_test.go
index 76c849d55..045d408db 100644
--- a/integration_tests/commands/resp/command_info_test.go
+++ b/integration_tests/commands/resp/command_info_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/command_list_test.go b/integration_tests/commands/resp/command_list_test.go
index a6dbeb590..cea7aebb9 100644
--- a/integration_tests/commands/resp/command_list_test.go
+++ b/integration_tests/commands/resp/command_list_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/command_rename_test.go b/integration_tests/commands/resp/command_rename_test.go
index 1d3976379..268e53463 100644
--- a/integration_tests/commands/resp/command_rename_test.go
+++ b/integration_tests/commands/resp/command_rename_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/copy_test.go b/integration_tests/commands/resp/copy_test.go
index f9db9951c..7fc46870c 100644
--- a/integration_tests/commands/resp/copy_test.go
+++ b/integration_tests/commands/resp/copy_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/countminsketch_test.go b/integration_tests/commands/resp/countminsketch_test.go
index 5ee7feb70..7139b499c 100644
--- a/integration_tests/commands/resp/countminsketch_test.go
+++ b/integration_tests/commands/resp/countminsketch_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/dbsize_test.go b/integration_tests/commands/resp/dbsize_test.go
index 1a3db23bb..f13312e22 100644
--- a/integration_tests/commands/resp/dbsize_test.go
+++ b/integration_tests/commands/resp/dbsize_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/decr_test.go b/integration_tests/commands/resp/decr_test.go
index 625ad5fc3..e3309c678 100644
--- a/integration_tests/commands/resp/decr_test.go
+++ b/integration_tests/commands/resp/decr_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/del_test.go b/integration_tests/commands/resp/del_test.go
index 780ba9c64..90715fc67 100644
--- a/integration_tests/commands/resp/del_test.go
+++ b/integration_tests/commands/resp/del_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/deque_test.go b/integration_tests/commands/resp/deque_test.go
index d80263633..05745f52e 100644
--- a/integration_tests/commands/resp/deque_test.go
+++ b/integration_tests/commands/resp/deque_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/dump_test.go b/integration_tests/commands/resp/dump_test.go
index 35326855f..bcdf6c94a 100644
--- a/integration_tests/commands/resp/dump_test.go
+++ b/integration_tests/commands/resp/dump_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/echo_test.go b/integration_tests/commands/resp/echo_test.go
index 50a2eac93..272c686ba 100644
--- a/integration_tests/commands/resp/echo_test.go
+++ b/integration_tests/commands/resp/echo_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/exists_test.go b/integration_tests/commands/resp/exists_test.go
index 6f5828f9c..a91fac80c 100644
--- a/integration_tests/commands/resp/exists_test.go
+++ b/integration_tests/commands/resp/exists_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
@@ -72,7 +59,8 @@ func TestExists(t *testing.T) {
}
cmd := tcase.command[i]
out := tcase.expected[i]
- assert.Equal(t, out, FireCommand(conn, cmd), "Value mismatch for cmd %s\n.", cmd)
+ assert.Equal(t, out, FireCommand(conn, cmd), "Value mismatch for cmd %s
+.", cmd)
}
})
}
diff --git a/integration_tests/commands/resp/expire_test.go b/integration_tests/commands/resp/expire_test.go
index f85ef0ea6..41bdc79cd 100644
--- a/integration_tests/commands/resp/expire_test.go
+++ b/integration_tests/commands/resp/expire_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/flushdb_test.go b/integration_tests/commands/resp/flushdb_test.go
index df652758e..b82b33d0f 100644
--- a/integration_tests/commands/resp/flushdb_test.go
+++ b/integration_tests/commands/resp/flushdb_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/geo_test.go b/integration_tests/commands/resp/geo_test.go
index f166783bd..e54e0bc51 100644
--- a/integration_tests/commands/resp/geo_test.go
+++ b/integration_tests/commands/resp/geo_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/get_test.go b/integration_tests/commands/resp/get_test.go
index 4358a139d..b184ccf99 100644
--- a/integration_tests/commands/resp/get_test.go
+++ b/integration_tests/commands/resp/get_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/getdel_test.go b/integration_tests/commands/resp/getdel_test.go
index 3b5459121..b655a9c5d 100644
--- a/integration_tests/commands/resp/getdel_test.go
+++ b/integration_tests/commands/resp/getdel_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/getex_test.go b/integration_tests/commands/resp/getex_test.go
index dabb5c1c0..12bcf5840 100644
--- a/integration_tests/commands/resp/getex_test.go
+++ b/integration_tests/commands/resp/getex_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/getrange_test.go b/integration_tests/commands/resp/getrange_test.go
index 00a3e5e05..ffd647696 100644
--- a/integration_tests/commands/resp/getrange_test.go
+++ b/integration_tests/commands/resp/getrange_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/getset_test.go b/integration_tests/commands/resp/getset_test.go
index 1dadf2595..d7e4e97f7 100644
--- a/integration_tests/commands/resp/getset_test.go
+++ b/integration_tests/commands/resp/getset_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/getunwatch_test.go b/integration_tests/commands/resp/getunwatch_test.go
index 511762351..381665c6f 100644
--- a/integration_tests/commands/resp/getunwatch_test.go
+++ b/integration_tests/commands/resp/getunwatch_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/getwatch_test.go b/integration_tests/commands/resp/getwatch_test.go
index 8bcf32a40..f013ead6c 100644
--- a/integration_tests/commands/resp/getwatch_test.go
+++ b/integration_tests/commands/resp/getwatch_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/hdel_test.go b/integration_tests/commands/resp/hdel_test.go
index a0f57c166..e65297b70 100644
--- a/integration_tests/commands/resp/hdel_test.go
+++ b/integration_tests/commands/resp/hdel_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/hello_test.go b/integration_tests/commands/resp/hello_test.go
index e3f6b2a20..662619d90 100644
--- a/integration_tests/commands/resp/hello_test.go
+++ b/integration_tests/commands/resp/hello_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/hexists_test.go b/integration_tests/commands/resp/hexists_test.go
index 6b294187a..34a02435b 100644
--- a/integration_tests/commands/resp/hexists_test.go
+++ b/integration_tests/commands/resp/hexists_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/hget_test.go b/integration_tests/commands/resp/hget_test.go
index e6aac7fc8..2b802cc32 100644
--- a/integration_tests/commands/resp/hget_test.go
+++ b/integration_tests/commands/resp/hget_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/hgetall_test.go b/integration_tests/commands/resp/hgetall_test.go
index cc7a7cb2e..27cf55502 100644
--- a/integration_tests/commands/resp/hgetall_test.go
+++ b/integration_tests/commands/resp/hgetall_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/hincrby_test.go b/integration_tests/commands/resp/hincrby_test.go
index 42bf19ce3..63fd5c5c1 100644
--- a/integration_tests/commands/resp/hincrby_test.go
+++ b/integration_tests/commands/resp/hincrby_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/hincrbyfloat_test.go b/integration_tests/commands/resp/hincrbyfloat_test.go
index 8b908315d..6a039e6a4 100644
--- a/integration_tests/commands/resp/hincrbyfloat_test.go
+++ b/integration_tests/commands/resp/hincrbyfloat_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/hkeys_test.go b/integration_tests/commands/resp/hkeys_test.go
index 4d6d408e0..a63aec484 100644
--- a/integration_tests/commands/resp/hkeys_test.go
+++ b/integration_tests/commands/resp/hkeys_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/hlen_test.go b/integration_tests/commands/resp/hlen_test.go
index 416c1c90b..d831458f2 100644
--- a/integration_tests/commands/resp/hlen_test.go
+++ b/integration_tests/commands/resp/hlen_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/hmget_test.go b/integration_tests/commands/resp/hmget_test.go
index 22e5c9898..36f564ebb 100644
--- a/integration_tests/commands/resp/hmget_test.go
+++ b/integration_tests/commands/resp/hmget_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/hmset_test.go b/integration_tests/commands/resp/hmset_test.go
index 371ab8025..40c390db9 100644
--- a/integration_tests/commands/resp/hmset_test.go
+++ b/integration_tests/commands/resp/hmset_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/hrandfield_test.go b/integration_tests/commands/resp/hrandfield_test.go
index 70e5a75d4..b214c4b8c 100644
--- a/integration_tests/commands/resp/hrandfield_test.go
+++ b/integration_tests/commands/resp/hrandfield_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/hscan_test.go b/integration_tests/commands/resp/hscan_test.go
index ec1f0ba2e..975c459c4 100644
--- a/integration_tests/commands/resp/hscan_test.go
+++ b/integration_tests/commands/resp/hscan_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/hset_test.go b/integration_tests/commands/resp/hset_test.go
index 8d85b5e8a..0ce6ee6ce 100644
--- a/integration_tests/commands/resp/hset_test.go
+++ b/integration_tests/commands/resp/hset_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/hsetnx_test.go b/integration_tests/commands/resp/hsetnx_test.go
index 1970ba63e..06198509a 100644
--- a/integration_tests/commands/resp/hsetnx_test.go
+++ b/integration_tests/commands/resp/hsetnx_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/hstrlen_test.go b/integration_tests/commands/resp/hstrlen_test.go
index 793646ad4..9d93c744c 100644
--- a/integration_tests/commands/resp/hstrlen_test.go
+++ b/integration_tests/commands/resp/hstrlen_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/hvals_test.go b/integration_tests/commands/resp/hvals_test.go
index ff0690187..952bc6f7a 100644
--- a/integration_tests/commands/resp/hvals_test.go
+++ b/integration_tests/commands/resp/hvals_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/hyperloglog_test.go b/integration_tests/commands/resp/hyperloglog_test.go
index d927220d7..cd0ddef58 100644
--- a/integration_tests/commands/resp/hyperloglog_test.go
+++ b/integration_tests/commands/resp/hyperloglog_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/incr_by_float_test.go b/integration_tests/commands/resp/incr_by_float_test.go
index b7a2f6935..cfc249684 100644
--- a/integration_tests/commands/resp/incr_by_float_test.go
+++ b/integration_tests/commands/resp/incr_by_float_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/incr_test.go b/integration_tests/commands/resp/incr_test.go
index 9fa2a1404..250467a17 100644
--- a/integration_tests/commands/resp/incr_test.go
+++ b/integration_tests/commands/resp/incr_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/json_test.go b/integration_tests/commands/resp/json_test.go
index 23bad0b27..3e805c881 100644
--- a/integration_tests/commands/resp/json_test.go
+++ b/integration_tests/commands/resp/json_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
@@ -91,7 +78,7 @@ func TestJSONOperations(t *testing.T) {
nestedJSON := `{"name":"Alice","address":{"city":"New York","zip":"10001"},"array":[1,2,3,4,5]}`
specialCharsJSON := `{"key":"value with spaces","emoji":"😀"}`
unicodeJSON := `{"unicode":"こんにちは世界"}`
- escapedCharsJSON := `{"escaped":"\"quoted\", \\backslash\\ and /forward/slash"}`
+ escapedCharsJSON := `{"escaped":"\"quoted\", \backslash\ and /forward/slash"}`
complexJSON := `{"inventory":{"mountain_bikes":[{"id":"bike:1","model":"Phoebe","price":1920,"specs":{"material":"carbon","weight":13.1},"colors":["black","silver"]},{"id":"bike:2","model":"Quaoar","price":2072,"specs":{"material":"aluminium","weight":7.9},"colors":["black","white"]},{"id":"bike:3","model":"Weywot","price":3264,"specs":{"material":"alloy","weight":13.8}}],"commuter_bikes":[{"id":"bike:4","model":"Salacia","price":1475,"specs":{"material":"aluminium","weight":16.6},"colors":["black","silver"]},{"id":"bike:5","model":"Mimas","price":3941,"specs":{"material":"alloy","weight":11.6}}]}}`
// Background:
@@ -1687,8 +1674,8 @@ func TestJSONARRINDEX(t *testing.T) {
FireCommand(conn, "DEL key")
defer FireCommand(conn, "DEL key")
- normalArray := `[0,1,2,3,4,3]`
- nestedArray := `{"arrays":[{"arr":[1,2,3]},{"arr":[2,3,4]},{"arr":[1]}]}`
+ normalArray := `[0,1,2,3,4,3]`
+ nestedArray := `{"arrays":[{"arr":[1,2,3]},{"arr":[2,3,4]},{"arr":[1]}]}`
nestedArray2 := `{"a":[3],"nested":{"a":{"b":2,"c":1}}}`
tests := []struct {
@@ -1698,129 +1685,129 @@ func TestJSONARRINDEX(t *testing.T) {
assertType []string
}{
{
- name: "should return error if key is not present",
- commands: []string{"json.set key $ " + normalArray, "json.arrindex nonExistentKey $ 3"},
- expected: []interface{}{"OK", "ERR could not perform this operation on a key that doesn't exist"},
+ name: "should return error if key is not present",
+ commands: []string{"json.set key $ " + normalArray, "json.arrindex nonExistentKey $ 3"},
+ expected: []interface{}{"OK", "ERR could not perform this operation on a key that doesn't exist"},
assertType: []string{"equal", "equal"},
},
{
- name: "should return error if json path is invalid",
- commands: []string{"json.set key $ " + normalArray, "json.arrindex key $invalid_path 3"},
- expected: []interface{}{"OK", "ERR Path '$invalid_path' does not exist"},
+ name: "should return error if json path is invalid",
+ commands: []string{"json.set key $ " + normalArray, "json.arrindex key $invalid_path 3"},
+ expected: []interface{}{"OK", "ERR Path '$invalid_path' does not exist"},
assertType: []string{"equal", "equal"},
},
{
- name: "should return error if provided path does not have any data",
- commands: []string{"json.set key $ " + normalArray, "json.arrindex key $.some_path 3"},
- expected: []interface{}{"OK", []interface{}{}},
+ name: "should return error if provided path does not have any data",
+ commands: []string{"json.set key $ " + normalArray, "json.arrindex key $.some_path 3"},
+ expected: []interface{}{"OK", []interface{}{}},
assertType: []string{"equal", "equal"},
},
{
- name: "should return error if invalid start index provided",
- commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 3 abc"},
- expected: []interface{}{"OK", "ERR Couldn't parse as integer"},
+ name: "should return error if invalid start index provided",
+ commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 3 abc"},
+ expected: []interface{}{"OK", "ERR Couldn't parse as integer"},
assertType: []string{"equal", "equal"},
},
{
- name: "should return error if invalid stop index provided",
- commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 3 4 abc"},
- expected: []interface{}{"OK", "ERR Couldn't parse as integer"},
+ name: "should return error if invalid stop index provided",
+ commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 3 4 abc"},
+ expected: []interface{}{"OK", "ERR Couldn't parse as integer"},
assertType: []string{"equal", "equal"},
},
{
- name: "should return array index when given element is present",
- commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 3"},
- expected: []interface{}{"OK", []interface{}{int64(3)}},
+ name: "should return array index when given element is present",
+ commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 3"},
+ expected: []interface{}{"OK", []interface{}{int64(3)}},
assertType: []string{"equal", "equal"},
},
{
- name: "should return -1 when given element is not present",
- commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 10"},
- expected: []interface{}{"OK", []interface{}{int64(-1)}},
+ name: "should return -1 when given element is not present",
+ commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 10"},
+ expected: []interface{}{"OK", []interface{}{int64(-1)}},
assertType: []string{"equal", "equal"},
},
{
- name: "should return array index with start optional param provided",
- commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 3 4"},
- expected: []interface{}{"OK", []interface{}{int64(5)}},
+ name: "should return array index with start optional param provided",
+ commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 3 4"},
+ expected: []interface{}{"OK", []interface{}{int64(5)}},
assertType: []string{"equal", "equal"},
},
{
- name: "should return array index with start and stop optional param provided",
- commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 4 4 5"},
- expected: []interface{}{"OK", []interface{}{int64(4)}},
+ name: "should return array index with start and stop optional param provided",
+ commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 4 4 5"},
+ expected: []interface{}{"OK", []interface{}{int64(4)}},
assertType: []string{"equal", "equal"},
},
{
- name: "should return -1 with start and stop optional param provided where start > stop",
- commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 3 2 1"},
- expected: []interface{}{"OK", []interface{}{int64(-1)}},
+ name: "should return -1 with start and stop optional param provided where start > stop",
+ commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 3 2 1"},
+ expected: []interface{}{"OK", []interface{}{int64(-1)}},
assertType: []string{"equal", "equal"},
},
{
- name: "should return -1 with start (out of boud) and stop (out of bound) optional param provided",
- commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 3 6 10"},
- expected: []interface{}{"OK", []interface{}{int64(-1)}},
+ name: "should return -1 with start (out of boud) and stop (out of bound) optional param provided",
+ commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 3 6 10"},
+ expected: []interface{}{"OK", []interface{}{int64(-1)}},
assertType: []string{"equal", "equal"},
},
{
- name: "should return list of array indexes for nested json",
- commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $.arrays.*.arr 3"},
- expected: []interface{}{"OK", []interface{}{int64(2), int64(1), int64(-1)}},
+ name: "should return list of array indexes for nested json",
+ commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $.arrays.*.arr 3"},
+ expected: []interface{}{"OK", []interface{}{int64(2), int64(1), int64(-1)}},
assertType: []string{"equal", "deep_equal"},
},
{
- name: "should return list of array indexes for multiple json path",
- commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $..arr 3"},
- expected: []interface{}{"OK", []interface{}{int64(2), int64(1), int64(-1)}},
+ name: "should return list of array indexes for multiple json path",
+ commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $..arr 3"},
+ expected: []interface{}{"OK", []interface{}{int64(2), int64(1), int64(-1)}},
assertType: []string{"equal", "deep_equal"},
},
{
- name: "should return array of length 1 for nested json path, with index",
- commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $.arrays[1].arr 3"},
- expected: []interface{}{"OK", []interface{}{int64(1)}},
+ name: "should return array of length 1 for nested json path, with index",
+ commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $.arrays[1].arr 3"},
+ expected: []interface{}{"OK", []interface{}{int64(1)}},
assertType: []string{"equal", "deep_equal"},
},
{
- name: "should return empty array for nonexistent path in nested json",
- commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $..arr1 3"},
- expected: []interface{}{"OK", []interface{}{}},
+ name: "should return empty array for nonexistent path in nested json",
+ commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $..arr1 3"},
+ expected: []interface{}{"OK", []interface{}{}},
assertType: []string{"equal", "deep_equal"},
},
{
- name: "should return -1 for each nonexisting value in nested json",
- commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $..arr 5"},
- expected: []interface{}{"OK", []interface{}{int64(-1), int64(-1), int64(-1)}},
+ name: "should return -1 for each nonexisting value in nested json",
+ commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $..arr 5"},
+ expected: []interface{}{"OK", []interface{}{int64(-1), int64(-1), int64(-1)}},
assertType: []string{"equal", "deep_equal"},
},
{
- name: "should return nil for non-array path and -1 for array path if value DNE",
- commands: []string{"json.set key $ " + nestedArray2, "json.arrindex key $..a 2"},
- expected: []interface{}{"OK", []interface{}{int64(-1), "(nil)"}},
+ name: "should return nil for non-array path and -1 for array path if value DNE",
+ commands: []string{"json.set key $ " + nestedArray2, "json.arrindex key $..a 2"},
+ expected: []interface{}{"OK", []interface{}{int64(-1), "(nil)"}},
assertType: []string{"equal", "deep_equal"},
},
{
- name: "should return nil for non-array path if value DNE and valid index for array path if value exists",
- commands: []string{"json.set key $ " + nestedArray2, "json.arrindex key $..a 3"},
- expected: []interface{}{"OK", []interface{}{int64(0), "(nil)"}},
+ name: "should return nil for non-array path if value DNE and valid index for array path if value exists",
+ commands: []string{"json.set key $ " + nestedArray2, "json.arrindex key $..a 3"},
+ expected: []interface{}{"OK", []interface{}{int64(0), "(nil)"}},
assertType: []string{"equal", "deep_equal"},
},
{
- name: "should handle stop index - 0 which should be last index inclusive",
- commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $..arr 3 1 0", "json.arrindex key $..arr 3 2 0"},
- expected: []interface{}{"OK", []interface{}{int64(2), int64(1), int64(-1)}, []interface{}{int64(2), int64(-1), int64(-1)}},
+ name: "should handle stop index - 0 which should be last index inclusive",
+ commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $..arr 3 1 0", "json.arrindex key $..arr 3 2 0"},
+ expected: []interface{}{"OK", []interface{}{int64(2), int64(1), int64(-1)}, []interface{}{int64(2), int64(-1), int64(-1)}},
assertType: []string{"equal", "deep_equal", "deep_equal"},
},
{
- name: "should handle stop index - -1 which should be last index exclusive",
- commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $..arr 3 1 -1", "json.arrindex key $..arr 3 2 -1"},
- expected: []interface{}{"OK", []interface{}{int64(-1), int64(1), int64(-1)}, []interface{}{int64(-1), int64(-1), int64(-1)}},
+ name: "should handle stop index - -1 which should be last index exclusive",
+ commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $..arr 3 1 -1", "json.arrindex key $..arr 3 2 -1"},
+ expected: []interface{}{"OK", []interface{}{int64(-1), int64(1), int64(-1)}, []interface{}{int64(-1), int64(-1), int64(-1)}},
assertType: []string{"equal", "deep_equal", "deep_equal"},
},
{
- name: "should handle negative start index",
- commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $..arr 3 -1"},
- expected: []interface{}{"OK", []interface{}{int64(2), int64(-1), int64(-1)}},
+ name: "should handle negative start index",
+ commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $..arr 3 -1"},
+ expected: []interface{}{"OK", []interface{}{int64(2), int64(-1), int64(-1)}},
assertType: []string{"equal", "deep_equal"},
},
}
@@ -1840,4 +1827,4 @@ func TestJSONARRINDEX(t *testing.T) {
}
})
}
-}
\ No newline at end of file
+}
diff --git a/integration_tests/commands/resp/jsondebug_test.go b/integration_tests/commands/resp/jsondebug_test.go
index e76230d90..7b07ec61d 100644
--- a/integration_tests/commands/resp/jsondebug_test.go
+++ b/integration_tests/commands/resp/jsondebug_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/jsonresp_test.go b/integration_tests/commands/resp/jsonresp_test.go
index 947d2bf88..5f606a974 100644
--- a/integration_tests/commands/resp/jsonresp_test.go
+++ b/integration_tests/commands/resp/jsonresp_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/keys_test.go b/integration_tests/commands/resp/keys_test.go
index 5ce99d427..c2a984e21 100644
--- a/integration_tests/commands/resp/keys_test.go
+++ b/integration_tests/commands/resp/keys_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/main_test.go b/integration_tests/commands/resp/main_test.go
index 7e0ab3a5d..a07f14c68 100644
--- a/integration_tests/commands/resp/main_test.go
+++ b/integration_tests/commands/resp/main_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/mget_test.go b/integration_tests/commands/resp/mget_test.go
index 79850e4aa..012553b46 100644
--- a/integration_tests/commands/resp/mget_test.go
+++ b/integration_tests/commands/resp/mget_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/mset_test.go b/integration_tests/commands/resp/mset_test.go
index 391b5e0c9..c87f5b3b1 100644
--- a/integration_tests/commands/resp/mset_test.go
+++ b/integration_tests/commands/resp/mset_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/object_test.go b/integration_tests/commands/resp/object_test.go
index 9fb23cf79..b5572d3b8 100644
--- a/integration_tests/commands/resp/object_test.go
+++ b/integration_tests/commands/resp/object_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/pfcountwatch_test.go b/integration_tests/commands/resp/pfcountwatch_test.go
index 5d5f1776e..57aacab73 100644
--- a/integration_tests/commands/resp/pfcountwatch_test.go
+++ b/integration_tests/commands/resp/pfcountwatch_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/set_data_cmd_test.go b/integration_tests/commands/resp/set_data_cmd_test.go
index 7376e584f..e629ccd3c 100644
--- a/integration_tests/commands/resp/set_data_cmd_test.go
+++ b/integration_tests/commands/resp/set_data_cmd_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/set_test.go b/integration_tests/commands/resp/set_test.go
index dee56f95c..6aec69346 100644
--- a/integration_tests/commands/resp/set_test.go
+++ b/integration_tests/commands/resp/set_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
@@ -221,7 +208,8 @@ func TestWithKeepTTLFlag(t *testing.T) {
for i := 0; i < len(tcase.commands); i++ {
cmd := tcase.commands[i]
out := tcase.expected[i]
- assert.Equal(t, out, FireCommand(conn, cmd), "Value mismatch for cmd %s\n.", cmd)
+ assert.Equal(t, out, FireCommand(conn, cmd), "Value mismatch for cmd %s
+.", cmd)
}
}
@@ -230,5 +218,6 @@ func TestWithKeepTTLFlag(t *testing.T) {
cmd := "GET k"
out := "(nil)"
- assert.Equal(t, out, FireCommand(conn, cmd), "Value mismatch for cmd %s\n.", cmd)
+ assert.Equal(t, out, FireCommand(conn, cmd), "Value mismatch for cmd %s
+.", cmd)
}
diff --git a/integration_tests/commands/resp/setup.go b/integration_tests/commands/resp/setup.go
index 5dc5ae0ec..560f35b58 100644
--- a/integration_tests/commands/resp/setup.go
+++ b/integration_tests/commands/resp/setup.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/touch_test.go b/integration_tests/commands/resp/touch_test.go
index cf291e2ff..0e455c7f1 100644
--- a/integration_tests/commands/resp/touch_test.go
+++ b/integration_tests/commands/resp/touch_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/ttl_pttl_test.go b/integration_tests/commands/resp/ttl_pttl_test.go
index 42546992b..b13ee6c75 100644
--- a/integration_tests/commands/resp/ttl_pttl_test.go
+++ b/integration_tests/commands/resp/ttl_pttl_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/type_test.go b/integration_tests/commands/resp/type_test.go
index 8d6c30994..0bb6c3029 100644
--- a/integration_tests/commands/resp/type_test.go
+++ b/integration_tests/commands/resp/type_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
@@ -78,7 +65,7 @@ func TestType(t *testing.T) {
"ZADD myzetset 1 'one' 2 'two'",
"TYPE myzetset",
},
- expected: []interface{}{int64(2), "zset"},
+ expected: []interface{}{int64(2), "zset"},
},
}
diff --git a/integration_tests/commands/resp/zcard_test.go b/integration_tests/commands/resp/zcard_test.go
index b5e4a445d..13ebcf19e 100644
--- a/integration_tests/commands/resp/zcard_test.go
+++ b/integration_tests/commands/resp/zcard_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/zpopmax_test.go b/integration_tests/commands/resp/zpopmax_test.go
index 832ce5bee..e7acd79f7 100644
--- a/integration_tests/commands/resp/zpopmax_test.go
+++ b/integration_tests/commands/resp/zpopmax_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/zrangewatch_test.go b/integration_tests/commands/resp/zrangewatch_test.go
index 3fa93d9c2..8d1d047da 100644
--- a/integration_tests/commands/resp/zrangewatch_test.go
+++ b/integration_tests/commands/resp/zrangewatch_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/zrank_test.go b/integration_tests/commands/resp/zrank_test.go
index f8affe50f..62ffc0fca 100644
--- a/integration_tests/commands/resp/zrank_test.go
+++ b/integration_tests/commands/resp/zrank_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/zrem_test.go b/integration_tests/commands/resp/zrem_test.go
index 13fc14f83..ecb24b71e 100644
--- a/integration_tests/commands/resp/zrem_test.go
+++ b/integration_tests/commands/resp/zrem_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/resp/zset_test.go b/integration_tests/commands/resp/zset_test.go
index d5f64909a..7ed28e545 100644
--- a/integration_tests/commands/resp/zset_test.go
+++ b/integration_tests/commands/resp/zset_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/integration_tests/commands/websocket/append_test.go b/integration_tests/commands/websocket/append_test.go
index 55eea5b93..e98125065 100644
--- a/integration_tests/commands/websocket/append_test.go
+++ b/integration_tests/commands/websocket/append_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/bit_test.go b/integration_tests/commands/websocket/bit_test.go
index 1e0ebdf19..b2a3d0cb3 100644
--- a/integration_tests/commands/websocket/bit_test.go
+++ b/integration_tests/commands/websocket/bit_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
@@ -96,7 +83,8 @@ import (
// out := tcase.Out[i]
// result, err := exec.FireCommandAndReadResponse(conn, cmd)
// assert.Nil(t, err)
-// assert.Equal(t, out, result, "Value mismatch for cmd %s\n.", cmd)
+// assert.Equal(t, out, result, "Value mismatch for cmd %s
+.", cmd)
// }
// }
// }
@@ -188,13 +176,13 @@ import (
// {
// name: "Bitop not of a key containing a string",
// cmds: []string{"SET foo foobar", "BITOP NOT baz foo", "GET baz", "BITOP NOT bazz baz", "GET bazz"},
-// expected: []interface{}{"OK", float64(6), "\\x99\\x90\\x90\\x9d\\x9e\\x8d", float64(6), "foobar"},
+// expected: []interface{}{"OK", float64(6), "\x99\x90\x90\x9d\x9e\x8d", float64(6), "foobar"},
// assertType: []string{"equal", "equal", "equal", "equal", "equal"},
// },
// {
// name: "Bitop not of a key containing an integer",
// cmds: []string{"SET foo 10", "BITOP NOT baz foo", "GET baz", "BITOP NOT bazz baz", "GET bazz"},
-// expected: []interface{}{"OK", float64(2), "\\xce\\xcf", float64(2), float64(10)},
+// expected: []interface{}{"OK", float64(2), "\xce\xcf", float64(2), float64(10)},
// assertType: []string{"equal", "equal", "equal", "equal", "equal"},
// },
// {
@@ -212,13 +200,13 @@ import (
// {
// name: "BITOP AND of keys containing integers and get the destkey",
// cmds: []string{"SET foo 10", "SET baz 5", "BITOP AND bazz foo baz", "GET bazz"},
-// expected: []interface{}{"OK", "OK", float64(2), "1\x00"},
+// expected: []interface{}{"OK", "OK", float64(2), "1 "},
// assertType: []string{"equal", "equal", "equal", "equal"},
// },
// {
// name: "Bitop or of keys containing a string, a bytearray and get the destkey",
// cmds: []string{"MSET foo foobar baz abcdef", "SETBIT bazz 8 1", "BITOP and bazzz foo baz bazz", "GET bazzz"},
-// expected: []interface{}{"OK", float64(0), float64(6), "\x00\x00\x00\x00\x00\x00"},
+// expected: []interface{}{"OK", float64(0), float64(6), " "},
// assertType: []string{"equal", "equal", "equal", "equal"},
// },
// {
@@ -236,25 +224,25 @@ import (
// {
// name: "BITOP OR of keys containing strings and a bytearray and get the destkey",
// cmds: []string{"MSET foo foobar baz abcdef", "SETBIT bazz 8 1", "BITOP OR bazzz foo baz bazz", "GET bazzz", "SETBIT bazz 8 0", "SETBIT bazz 49 1", "BITOP OR bazzz foo baz bazz", "GET bazzz"},
-// expected: []interface{}{"OK", float64(0), float64(6), "g\xefofev", float64(1), float64(0), float64(7), "goofev@"},
+// expected: []interface{}{"OK", float64(0), float64(6), "gofev", float64(1), float64(0), float64(7), "goofev@"},
// assertType: []string{"equal", "equal", "equal", "equal", "equal", "equal", "equal", "equal"},
// },
// {
// name: "BITOP XOR of keys containing strings and get the destkey",
// cmds: []string{"MSET foo foobar baz abcdef", "BITOP XOR bazz foo baz", "GET bazz"},
-// expected: []interface{}{"OK", float64(6), "\x07\x0d\x0c\x06\x04\x14"},
+// expected: []interface{}{"OK", float64(6), "
"},
// assertType: []string{"equal", "equal", "equal"},
// },
// {
// name: "BITOP XOR of keys containing strings and a bytearray and get the destkey",
// cmds: []string{"MSET foo foobar baz abcdef", "SETBIT bazz 8 1", "BITOP XOR bazzz foo baz bazz", "GET bazzz", "SETBIT bazz 8 0", "SETBIT bazz 49 1", "BITOP XOR bazzz foo baz bazz", "GET bazzz", "Setbit bazz 49 0", "bitop xor bazzz foo baz bazz", "get bazzz"},
-// expected: []interface{}{"OK", float64(0), float64(6), "\x07\x8d\x0c\x06\x04\x14", float64(1), float64(0), float64(7), "\x07\r\x0c\x06\x04\x14@", float64(1), float64(7), "\x07\r\x0c\x06\x04\x14\x00"},
+// expected: []interface{}{"OK", float64(0), float64(6), "", float64(1), float64(0), float64(7), "
@", float64(1), float64(7), "
"},
// assertType: []string{"equal", "equal", "equal", "equal", "equal", "equal", "equal", "equal", "equal", "equal", "equal"},
// },
// {
// name: "BITOP XOR of keys containing integers and get the destkey",
// cmds: []string{"SET foo 10", "SET baz 5", "BITOP XOR bazz foo baz", "GET bazz"},
-// expected: []interface{}{"OK", "OK", float64(2), "\x040"},
+// expected: []interface{}{"OK", "OK", float64(2), "0"},
// assertType: []string{"equal", "equal", "equal", "equal"},
// },
// }
@@ -372,7 +360,8 @@ func TestBitCount(t *testing.T) {
out := tcase.Out[i]
res, err := exec.FireCommandAndReadResponse(conn, cmd)
assert.Nil(t, err)
- assert.Equal(t, out, res, "Value mismatch for cmd %s\n.", cmd)
+ assert.Equal(t, out, res, "Value mismatch for cmd %s
+.", cmd)
}
}
}
@@ -389,133 +378,133 @@ func TestBitPos(t *testing.T) {
}{
{
name: "String interval BIT 0,-1 ",
- val: "\\x00\\xff\\x00",
+ val: "\x00\xff\x00",
inCmd: "BITPOS testkey 0 0 -1 bit",
out: float64(0),
},
{
name: "String interval BIT 8,-1",
- val: "\\x00\\xff\\x00",
+ val: "\x00\xff\x00",
inCmd: "BITPOS testkey 0 8 -1 bit",
out: float64(8),
},
{
name: "String interval BIT 16,-1",
- val: "\\x00\\xff\\x00",
+ val: "\x00\xff\x00",
inCmd: "BITPOS testkey 0 16 -1 bit",
out: float64(16),
},
{
name: "String interval BIT 16,200",
- val: "\\x00\\xff\\x00",
+ val: "\x00\xff\x00",
inCmd: "BITPOS testkey 0 16 200 bit",
out: float64(16),
},
{
name: "String interval BIT 8,8",
- val: "\\x00\\xff\\x00",
+ val: "\x00\xff\x00",
inCmd: "BITPOS testkey 0 8 8 bit",
out: float64(8),
},
{
name: "FindsFirstZeroBit",
- val: "\xff\xf0\x00",
+ val: " ",
inCmd: "BITPOS testkey 0",
out: float64(12),
},
{
name: "FindsFirstOneBit",
- val: "\x00\x0f\xff",
+ val: " ",
inCmd: "BITPOS testkey 1",
out: float64(12),
},
{
name: "NoOneBitFound",
- val: "\x00\x00\x00",
+ val: " ",
inCmd: "BITPOS testkey 1",
out: float64(-1),
},
{
name: "NoZeroBitFound",
- val: "\xff\xff\xff",
+ val: "",
inCmd: "BITPOS testkey 0",
out: float64(24),
},
{
name: "NoZeroBitFoundWithRangeStartPos",
- val: "\xff\xff\xff",
+ val: "",
inCmd: "BITPOS testkey 0 2",
out: float64(24),
},
{
name: "NoZeroBitFoundWithOOBRangeStartPos",
- val: "\xff\xff\xff",
+ val: "",
inCmd: "BITPOS testkey 0 4",
out: float64(-1),
},
{
name: "NoZeroBitFoundWithRange",
- val: "\xff\xff\xff",
+ val: "",
inCmd: "BITPOS testkey 0 2 2",
out: float64(-1),
},
{
name: "NoZeroBitFoundWithRangeAndRangeType",
- val: "\xff\xff\xff",
+ val: "",
inCmd: "BITPOS testkey 0 2 2 BIT",
out: float64(-1),
},
{
name: "FindsFirstZeroBitInRange",
- val: "\xff\xf0\xff",
+ val: "",
inCmd: "BITPOS testkey 0 1 2",
out: float64(12),
},
{
name: "FindsFirstOneBitInRange",
- val: "\x00\x00\xf0",
+ val: " ",
inCmd: "BITPOS testkey 1 2 3",
out: float64(16),
},
{
name: "StartGreaterThanEnd",
- val: "\xff\xf0\x00",
+ val: " ",
inCmd: "BITPOS testkey 0 3 2",
out: float64(-1),
},
{
name: "FindsFirstOneBitWithNegativeStart",
- val: "\x00\x00\xf0",
+ val: " ",
inCmd: "BITPOS testkey 1 -2 -1",
out: float64(16),
},
{
name: "FindsFirstZeroBitWithNegativeEnd",
- val: "\xff\xf0\xff",
+ val: "",
inCmd: "BITPOS testkey 0 1 -1",
out: float64(12),
},
{
name: "FindsFirstZeroBitInByteRange",
- val: "\xff\x00\xff",
+ val: " ",
inCmd: "BITPOS testkey 0 1 2 BYTE",
out: float64(8),
},
{
name: "FindsFirstOneBitInBitRange",
- val: "\x00\x01\x00",
+ val: " ",
inCmd: "BITPOS testkey 1 0 16 BIT",
out: float64(15),
},
{
name: "NoBitFoundInByteRange",
- val: "\xff\xff\xff",
+ val: "",
inCmd: "BITPOS testkey 0 0 2 BYTE",
out: float64(-1),
},
{
name: "NoBitFoundInBitRange",
- val: "\x00\x00\x00",
+ val: " ",
inCmd: "BITPOS testkey 1 0 23 BIT",
out: float64(-1),
},
@@ -533,13 +522,13 @@ func TestBitPos(t *testing.T) {
},
{
name: "SingleByteString",
- val: "\x80",
+ val: "",
inCmd: "BITPOS testkey 1",
out: float64(0),
},
{
name: "RangeExceedsStringLength",
- val: "\x00\xff",
+ val: " ",
inCmd: "BITPOS testkey 1 0 20 BIT",
out: float64(8),
},
@@ -604,55 +593,55 @@ func TestBitPos(t *testing.T) {
},
{
name: "BitRangeStartGreaterThanBitLength",
- val: "\xff\xff\xff",
+ val: "",
inCmd: "BITPOS testkey 0 25 30 BIT",
out: float64(-1),
},
{
name: "BitRangeEndExceedsBitLength",
- val: "\xff\xff\xff",
+ val: "",
inCmd: "BITPOS testkey 0 0 30 BIT",
out: float64(-1),
},
{
name: "NegativeStartInBitRange",
- val: "\x00\xff\xff",
+ val: " ",
inCmd: "BITPOS testkey 1 -16 -1 BIT",
out: float64(8),
},
{
name: "LargeNegativeStart",
- val: "\x00\xff\xff",
+ val: " ",
inCmd: "BITPOS testkey 1 -100 -1",
out: float64(8),
},
{
name: "LargePositiveEnd",
- val: "\x00\xff\xff",
+ val: " ",
inCmd: "BITPOS testkey 1 0 100",
out: float64(8),
},
{
name: "StartAndEndEqualInByteRange",
- val: "\x0f\xff\xff",
+ val: "",
inCmd: "BITPOS testkey 0 1 1 BYTE",
out: float64(-1),
},
{
name: "StartAndEndEqualInBitRange",
- val: "\x0f\xff\xff",
+ val: "",
inCmd: "BITPOS testkey 1 1 1 BIT",
out: float64(-1),
},
{
name: "FindFirstZeroBitInNegativeRange",
- val: "\xff\x00\xff",
+ val: " ",
inCmd: "BITPOS testkey 0 -2 -1",
out: float64(8),
},
{
name: "FindFirstOneBitInNegativeRangeBIT",
- val: "\x00\x00\x80",
+ val: " ",
inCmd: "BITPOS testkey 1 -8 -1 BIT",
out: float64(16),
},
@@ -670,37 +659,37 @@ func TestBitPos(t *testing.T) {
},
{
name: "SingleBitStringZero",
- val: "\x00",
+ val: " ",
inCmd: "BITPOS testkey 1",
out: float64(-1),
},
{
name: "SingleBitStringOne",
- val: "\x01",
+ val: "",
inCmd: "BITPOS testkey 0",
out: float64(0),
},
{
name: "AllBitsSetExceptLast",
- val: "\xff\xff\xfe",
+ val: "",
inCmd: "BITPOS testkey 0",
out: float64(23),
},
{
name: "OnlyLastBitSet",
- val: "\x00\x00\x01",
+ val: " ",
inCmd: "BITPOS testkey 1",
out: float64(23),
},
{
name: "AlternatingBitsLongString",
- val: "\xaa\xaa\xaa\xaa\xaa",
+ val: "",
inCmd: "BITPOS testkey 0",
out: float64(1),
},
{
name: "VeryLargeByteString",
- val: strings.Repeat("\xff", 1000) + "\x00",
+ val: strings.Repeat("", 1000) + " ",
inCmd: "BITPOS testkey 0",
out: float64(8000),
},
@@ -743,7 +732,8 @@ func TestBitPos(t *testing.T) {
result, err := exec.FireCommandAndReadResponse(conn, tc.inCmd)
assert.Nil(t, err)
- assert.Equal(t, tc.out, result, "Mismatch for cmd %s\n", tc.inCmd)
+ assert.Equal(t, tc.out, result, "Mismatch for cmd %s
+", tc.inCmd)
})
}
}
diff --git a/integration_tests/commands/websocket/bloom_test.go b/integration_tests/commands/websocket/bloom_test.go
index af2c17a10..8572ba85f 100644
--- a/integration_tests/commands/websocket/bloom_test.go
+++ b/integration_tests/commands/websocket/bloom_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/command_docs_test.go b/integration_tests/commands/websocket/command_docs_test.go
index f6f999402..3c033d614 100644
--- a/integration_tests/commands/websocket/command_docs_test.go
+++ b/integration_tests/commands/websocket/command_docs_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
@@ -38,7 +25,14 @@ func TestCommandDocs(t *testing.T) {
string("set"),
[]interface{}{
string("summary"),
- string("SET puts a new pair in db as in the args\n\t\targs must contain key and value.\n\t\targs can also contain multiple options -\n\t\tEX or ex which will set the expiry time(in secs) for the key\n\t\tReturns encoded error response if at least a pair is not part of args\n\t\tReturns encoded error response if expiry tme value in not integer\n\t\tReturns encoded OK RESP once new entry is added\n\t\tIf the key already exists then the value will be overwritten and expiry will be discarded"),
+ string("SET puts a new pair in db as in the args
+ args must contain key and value.
+ args can also contain multiple options -
+ EX or ex which will set the expiry time(in secs) for the key
+ Returns encoded error response if at least a pair is not part of args
+ Returns encoded error response if expiry tme value in not integer
+ Returns encoded OK RESP once new entry is added
+ If the key already exists then the value will be overwritten and expiry will be discarded"),
string("arity"), float64(-3),
string("beginIndex"), float64(1),
string("lastIndex"), float64(0),
@@ -54,7 +48,10 @@ func TestCommandDocs(t *testing.T) {
"get",
[]interface{}{
string("summary"),
- string("GET returns the value for the queried key in args\n\t\tThe key should be the only param in args\n\t\tThe RESP value of the key is encoded and then returned\n\t\tGET returns RespNIL if key is expired or it does not exist"),
+ string("GET returns the value for the queried key in args
+ The key should be the only param in args
+ The RESP value of the key is encoded and then returned
+ GET returns RespNIL if key is expired or it does not exist"),
string("arity"), float64(2),
string("beginIndex"), float64(1),
string("lastIndex"), float64(0),
@@ -89,7 +86,14 @@ func TestCommandDocs(t *testing.T) {
"set",
[]interface{}{
string("summary"),
- string("SET puts a new pair in db as in the args\n\t\targs must contain key and value.\n\t\targs can also contain multiple options -\n\t\tEX or ex which will set the expiry time(in secs) for the key\n\t\tReturns encoded error response if at least a pair is not part of args\n\t\tReturns encoded error response if expiry tme value in not integer\n\t\tReturns encoded OK RESP once new entry is added\n\t\tIf the key already exists then the value will be overwritten and expiry will be discarded"),
+ string("SET puts a new pair in db as in the args
+ args must contain key and value.
+ args can also contain multiple options -
+ EX or ex which will set the expiry time(in secs) for the key
+ Returns encoded error response if at least a pair is not part of args
+ Returns encoded error response if expiry tme value in not integer
+ Returns encoded OK RESP once new entry is added
+ If the key already exists then the value will be overwritten and expiry will be discarded"),
string("arity"), float64(-3),
string("beginIndex"), float64(1),
string("lastIndex"), float64(0),
@@ -104,7 +108,14 @@ func TestCommandDocs(t *testing.T) {
"set",
[]interface{}{
string("summary"),
- string("SET puts a new pair in db as in the args\n\t\targs must contain key and value.\n\t\targs can also contain multiple options -\n\t\tEX or ex which will set the expiry time(in secs) for the key\n\t\tReturns encoded error response if at least a pair is not part of args\n\t\tReturns encoded error response if expiry tme value in not integer\n\t\tReturns encoded OK RESP once new entry is added\n\t\tIf the key already exists then the value will be overwritten and expiry will be discarded"),
+ string("SET puts a new pair in db as in the args
+ args must contain key and value.
+ args can also contain multiple options -
+ EX or ex which will set the expiry time(in secs) for the key
+ Returns encoded error response if at least a pair is not part of args
+ Returns encoded error response if expiry tme value in not integer
+ Returns encoded OK RESP once new entry is added
+ If the key already exists then the value will be overwritten and expiry will be discarded"),
string("arity"), float64(-3),
string("beginIndex"), float64(1),
string("lastIndex"), float64(0),
@@ -113,7 +124,10 @@ func TestCommandDocs(t *testing.T) {
[]interface{}{"get",
[]interface{}{
string("summary"),
- string("GET returns the value for the queried key in args\n\t\tThe key should be the only param in args\n\t\tThe RESP value of the key is encoded and then returned\n\t\tGET returns RespNIL if key is expired or it does not exist"),
+ string("GET returns the value for the queried key in args
+ The key should be the only param in args
+ The RESP value of the key is encoded and then returned
+ GET returns RespNIL if key is expired or it does not exist"),
string("arity"), float64(2),
string("beginIndex"), float64(1),
string("lastIndex"), float64(0),
diff --git a/integration_tests/commands/websocket/countminsketch_test.go b/integration_tests/commands/websocket/countminsketch_test.go
index 4f6b52561..a4f6db664 100644
--- a/integration_tests/commands/websocket/countminsketch_test.go
+++ b/integration_tests/commands/websocket/countminsketch_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/decr_test.go b/integration_tests/commands/websocket/decr_test.go
index 62d59a024..158269ad6 100644
--- a/integration_tests/commands/websocket/decr_test.go
+++ b/integration_tests/commands/websocket/decr_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/del_test.go b/integration_tests/commands/websocket/del_test.go
index e2b8e821d..2779885b9 100644
--- a/integration_tests/commands/websocket/del_test.go
+++ b/integration_tests/commands/websocket/del_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/deque_test.go b/integration_tests/commands/websocket/deque_test.go
index 1b98e7452..925c93235 100644
--- a/integration_tests/commands/websocket/deque_test.go
+++ b/integration_tests/commands/websocket/deque_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/exists_test.go b/integration_tests/commands/websocket/exists_test.go
index 1a90ff867..97fe729c1 100644
--- a/integration_tests/commands/websocket/exists_test.go
+++ b/integration_tests/commands/websocket/exists_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/expire_test.go b/integration_tests/commands/websocket/expire_test.go
index a46a96dc4..6e6718f37 100644
--- a/integration_tests/commands/websocket/expire_test.go
+++ b/integration_tests/commands/websocket/expire_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/geo_test.go b/integration_tests/commands/websocket/geo_test.go
index a46d2c4ea..f13838132 100644
--- a/integration_tests/commands/websocket/geo_test.go
+++ b/integration_tests/commands/websocket/geo_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/get_test.go b/integration_tests/commands/websocket/get_test.go
index 26e3e38d1..8ddd27895 100644
--- a/integration_tests/commands/websocket/get_test.go
+++ b/integration_tests/commands/websocket/get_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/getrange_test.go b/integration_tests/commands/websocket/getrange_test.go
index a29ef63c9..ad9232fad 100644
--- a/integration_tests/commands/websocket/getrange_test.go
+++ b/integration_tests/commands/websocket/getrange_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/hdel_test.go b/integration_tests/commands/websocket/hdel_test.go
index fc5c11319..305b155fa 100644
--- a/integration_tests/commands/websocket/hdel_test.go
+++ b/integration_tests/commands/websocket/hdel_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/helper.go b/integration_tests/commands/websocket/helper.go
index 90c3f359a..68354badb 100644
--- a/integration_tests/commands/websocket/helper.go
+++ b/integration_tests/commands/websocket/helper.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/hexists_test.go b/integration_tests/commands/websocket/hexists_test.go
index 8194d0b70..66abf3daf 100644
--- a/integration_tests/commands/websocket/hexists_test.go
+++ b/integration_tests/commands/websocket/hexists_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/hget_test.go b/integration_tests/commands/websocket/hget_test.go
index 16b80884f..c28b287c2 100644
--- a/integration_tests/commands/websocket/hget_test.go
+++ b/integration_tests/commands/websocket/hget_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/hincrby_test.go b/integration_tests/commands/websocket/hincrby_test.go
index db589aade..56cc234c3 100644
--- a/integration_tests/commands/websocket/hincrby_test.go
+++ b/integration_tests/commands/websocket/hincrby_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/hincrbyfloat_test.go b/integration_tests/commands/websocket/hincrbyfloat_test.go
index 819741df2..764e10423 100644
--- a/integration_tests/commands/websocket/hincrbyfloat_test.go
+++ b/integration_tests/commands/websocket/hincrbyfloat_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/hkeys_test.go b/integration_tests/commands/websocket/hkeys_test.go
index 66adc00fc..9a4dfc5e2 100644
--- a/integration_tests/commands/websocket/hkeys_test.go
+++ b/integration_tests/commands/websocket/hkeys_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/hlen_test.go b/integration_tests/commands/websocket/hlen_test.go
index 2410809cc..d19c2cbb2 100644
--- a/integration_tests/commands/websocket/hlen_test.go
+++ b/integration_tests/commands/websocket/hlen_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/hrandfield_test.go b/integration_tests/commands/websocket/hrandfield_test.go
index a2d34e184..157aec812 100644
--- a/integration_tests/commands/websocket/hrandfield_test.go
+++ b/integration_tests/commands/websocket/hrandfield_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/hscan_test.go b/integration_tests/commands/websocket/hscan_test.go
index 62e0c2fc8..6432d3571 100644
--- a/integration_tests/commands/websocket/hscan_test.go
+++ b/integration_tests/commands/websocket/hscan_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/hset_test.go b/integration_tests/commands/websocket/hset_test.go
index dc1f1b551..4ac4e54a9 100644
--- a/integration_tests/commands/websocket/hset_test.go
+++ b/integration_tests/commands/websocket/hset_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/hstrlen_test.go b/integration_tests/commands/websocket/hstrlen_test.go
index e84a79f9e..ecebbe87c 100644
--- a/integration_tests/commands/websocket/hstrlen_test.go
+++ b/integration_tests/commands/websocket/hstrlen_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/hvals_test.go b/integration_tests/commands/websocket/hvals_test.go
index e60401db1..bb6112b89 100644
--- a/integration_tests/commands/websocket/hvals_test.go
+++ b/integration_tests/commands/websocket/hvals_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/hyperloglog_test.go b/integration_tests/commands/websocket/hyperloglog_test.go
index 683398127..c580059cc 100644
--- a/integration_tests/commands/websocket/hyperloglog_test.go
+++ b/integration_tests/commands/websocket/hyperloglog_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
//go:build ignore
// +build ignore
diff --git a/integration_tests/commands/websocket/incr_by_float_test.go b/integration_tests/commands/websocket/incr_by_float_test.go
index b99532183..5c955f049 100644
--- a/integration_tests/commands/websocket/incr_by_float_test.go
+++ b/integration_tests/commands/websocket/incr_by_float_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/incr_test.go b/integration_tests/commands/websocket/incr_test.go
index ce21210e0..c66ad7014 100644
--- a/integration_tests/commands/websocket/incr_test.go
+++ b/integration_tests/commands/websocket/incr_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/json_test.go b/integration_tests/commands/websocket/json_test.go
index e2f5b0eb6..8bd0d8958 100644
--- a/integration_tests/commands/websocket/json_test.go
+++ b/integration_tests/commands/websocket/json_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
@@ -1248,159 +1235,159 @@ func TestJSONARRINDEX(t *testing.T) {
defer exec.FireCommand(conn, postTestChecksCommand)
- normalArray := `[0,1,2,3,4,3]`
- nestedArray := `{"arrays":[{"arr":[1,2,3]},{"arr":[2,3,4]},{"arr":[1]}]}`
+ normalArray := `[0,1,2,3,4,3]`
+ nestedArray := `{"arrays":[{"arr":[1,2,3]},{"arr":[2,3,4]},{"arr":[1]}]}`
nestedArray2 := `{"a":[3],"nested":{"a":{"b":2,"c":1}}}`
tests := []IntegrationTestCase{
{
- name: "should return error if key is not present",
- commands: []string{"json.set key $ " + normalArray, "json.arrindex nonExistentKey $ 3"},
- expected: []interface{}{"OK", "ERR could not perform this operation on a key that doesn't exist"},
+ name: "should return error if key is not present",
+ commands: []string{"json.set key $ " + normalArray, "json.arrindex nonExistentKey $ 3"},
+ expected: []interface{}{"OK", "ERR could not perform this operation on a key that doesn't exist"},
assertType: []string{"equal", "equal"},
cleanUp: []string{"DEL key"},
},
{
- name: "should return error if json path is invalid",
- commands: []string{"json.set key $ " + normalArray, "json.arrindex key $invalid_path 3"},
- expected: []interface{}{"OK", "ERR Path '$invalid_path' does not exist"},
+ name: "should return error if json path is invalid",
+ commands: []string{"json.set key $ " + normalArray, "json.arrindex key $invalid_path 3"},
+ expected: []interface{}{"OK", "ERR Path '$invalid_path' does not exist"},
assertType: []string{"equal", "equal"},
cleanUp: []string{"DEL key"},
},
{
- name: "should return error if provided path does not have any data",
- commands: []string{"json.set key $ " + normalArray, "json.arrindex key $.some_path 3"},
- expected: []interface{}{"OK", []interface{}{}},
+ name: "should return error if provided path does not have any data",
+ commands: []string{"json.set key $ " + normalArray, "json.arrindex key $.some_path 3"},
+ expected: []interface{}{"OK", []interface{}{}},
assertType: []string{"equal", "equal"},
cleanUp: []string{"DEL key"},
},
{
- name: "should return error if invalid start index provided",
- commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 3 abc"},
- expected: []interface{}{"OK", "ERR Couldn't parse as integer"},
+ name: "should return error if invalid start index provided",
+ commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 3 abc"},
+ expected: []interface{}{"OK", "ERR Couldn't parse as integer"},
assertType: []string{"equal", "equal"},
cleanUp: []string{"DEL key"},
},
{
- name: "should return error if invalid stop index provided",
- commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 3 4 abc"},
- expected: []interface{}{"OK", "ERR Couldn't parse as integer"},
+ name: "should return error if invalid stop index provided",
+ commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 3 4 abc"},
+ expected: []interface{}{"OK", "ERR Couldn't parse as integer"},
assertType: []string{"equal", "equal"},
cleanUp: []string{"DEL key"},
},
{
- name: "should return array index when given element is present",
- commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 3"},
- expected: []interface{}{"OK", []interface{}{float64(3)}},
+ name: "should return array index when given element is present",
+ commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 3"},
+ expected: []interface{}{"OK", []interface{}{float64(3)}},
assertType: []string{"equal", "equal"},
cleanUp: []string{"DEL key"},
},
{
- name: "should return -1 when given element is not present",
- commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 10"},
- expected: []interface{}{"OK", []interface{}{float64(-1)}},
+ name: "should return -1 when given element is not present",
+ commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 10"},
+ expected: []interface{}{"OK", []interface{}{float64(-1)}},
assertType: []string{"equal", "equal"},
cleanUp: []string{"DEL key"},
},
{
- name: "should return array index with start optional param provided",
- commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 3 4"},
- expected: []interface{}{"OK", []interface{}{float64(5)}},
+ name: "should return array index with start optional param provided",
+ commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 3 4"},
+ expected: []interface{}{"OK", []interface{}{float64(5)}},
assertType: []string{"equal", "equal"},
cleanUp: []string{"DEL key"},
},
{
- name: "should return array index with start and stop optional param provided",
- commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 4 4 5"},
- expected: []interface{}{"OK", []interface{}{float64(4)}},
+ name: "should return array index with start and stop optional param provided",
+ commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 4 4 5"},
+ expected: []interface{}{"OK", []interface{}{float64(4)}},
assertType: []string{"equal", "equal"},
cleanUp: []string{"DEL key"},
},
{
- name: "should return -1 with start and stop optional param provided where start > stop",
- commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 3 2 1"},
- expected: []interface{}{"OK", []interface{}{float64(-1)}},
+ name: "should return -1 with start and stop optional param provided where start > stop",
+ commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 3 2 1"},
+ expected: []interface{}{"OK", []interface{}{float64(-1)}},
assertType: []string{"equal", "equal"},
cleanUp: []string{"DEL key"},
},
{
- name: "should return -1 with start (out of boud) and stop (out of bound) optional param provided",
- commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 3 6 10"},
- expected: []interface{}{"OK", []interface{}{float64(-1)}},
+ name: "should return -1 with start (out of boud) and stop (out of bound) optional param provided",
+ commands: []string{"json.set key $ " + normalArray, "json.arrindex key $ 3 6 10"},
+ expected: []interface{}{"OK", []interface{}{float64(-1)}},
assertType: []string{"equal", "equal"},
cleanUp: []string{"DEL key"},
},
{
- name: "should return list of array indexes for nested json",
- commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $.arrays.*.arr 3"},
- expected: []interface{}{"OK", []interface{}{float64(2), float64(1), float64(-1)}},
+ name: "should return list of array indexes for nested json",
+ commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $.arrays.*.arr 3"},
+ expected: []interface{}{"OK", []interface{}{float64(2), float64(1), float64(-1)}},
assertType: []string{"equal", "deep_equal"},
cleanUp: []string{"DEL key"},
},
{
- name: "should return list of array indexes for multiple json path",
- commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $..arr 3"},
- expected: []interface{}{"OK", []interface{}{float64(2), float64(1), float64(-1)}},
+ name: "should return list of array indexes for multiple json path",
+ commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $..arr 3"},
+ expected: []interface{}{"OK", []interface{}{float64(2), float64(1), float64(-1)}},
assertType: []string{"equal", "deep_equal"},
cleanUp: []string{"DEL key"},
},
{
- name: "should return array of length 1 for nested json path, with index",
- commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $.arrays[1].arr 3"},
- expected: []interface{}{"OK", []interface{}{float64(1)}},
+ name: "should return array of length 1 for nested json path, with index",
+ commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $.arrays[1].arr 3"},
+ expected: []interface{}{"OK", []interface{}{float64(1)}},
assertType: []string{"equal", "deep_equal"},
cleanUp: []string{"DEL key"},
},
{
- name: "should return empty array for nonexistent path in nested json",
- commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $..arr1 3"},
- expected: []interface{}{"OK", []interface{}{}},
+ name: "should return empty array for nonexistent path in nested json",
+ commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $..arr1 3"},
+ expected: []interface{}{"OK", []interface{}{}},
assertType: []string{"equal", "deep_equal"},
cleanUp: []string{"DEL key"},
},
{
- name: "should return -1 for each nonexisting value in nested json",
- commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $..arr 5"},
- expected: []interface{}{"OK", []interface{}{float64(-1), float64(-1), float64(-1)}},
+ name: "should return -1 for each nonexisting value in nested json",
+ commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $..arr 5"},
+ expected: []interface{}{"OK", []interface{}{float64(-1), float64(-1), float64(-1)}},
assertType: []string{"equal", "deep_equal"},
cleanUp: []string{"DEL key"},
},
{
- name: "should return nil for non-array path and -1 for array path if value DNE",
- commands: []string{"json.set key $ " + nestedArray2, "json.arrindex key $..a 2"},
- expected: []interface{}{"OK", []interface{}{float64(-1), nil}},
+ name: "should return nil for non-array path and -1 for array path if value DNE",
+ commands: []string{"json.set key $ " + nestedArray2, "json.arrindex key $..a 2"},
+ expected: []interface{}{"OK", []interface{}{float64(-1), nil}},
assertType: []string{"equal", "deep_equal"},
cleanUp: []string{"DEL key"},
},
{
- name: "should return nil for non-array path if value DNE and valid index for array path if value exists",
- commands: []string{"json.set key $ " + nestedArray2, "json.arrindex key $..a 3"},
- expected: []interface{}{"OK", []interface{}{float64(0), nil}},
+ name: "should return nil for non-array path if value DNE and valid index for array path if value exists",
+ commands: []string{"json.set key $ " + nestedArray2, "json.arrindex key $..a 3"},
+ expected: []interface{}{"OK", []interface{}{float64(0), nil}},
assertType: []string{"equal", "deep_equal"},
cleanUp: []string{"DEL key"},
},
{
- name: "should handle stop index - 0 which should be last index inclusive",
- commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $..arr 3 1 0", "json.arrindex key $..arr 3 2 0"},
- expected: []interface{}{"OK", []interface{}{float64(2), float64(1), float64(-1)}, []interface{}{float64(2), float64(-1), float64(-1)}},
+ name: "should handle stop index - 0 which should be last index inclusive",
+ commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $..arr 3 1 0", "json.arrindex key $..arr 3 2 0"},
+ expected: []interface{}{"OK", []interface{}{float64(2), float64(1), float64(-1)}, []interface{}{float64(2), float64(-1), float64(-1)}},
assertType: []string{"equal", "deep_equal", "deep_equal"},
cleanUp: []string{"DEL key"},
},
{
- name: "should handle stop index - -1 which should be last index exclusive",
- commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $..arr 3 1 -1", "json.arrindex key $..arr 3 2 -1"},
- expected: []interface{}{"OK", []interface{}{float64(-1), float64(1), float64(-1)}, []interface{}{float64(-1), float64(-1), float64(-1)}},
+ name: "should handle stop index - -1 which should be last index exclusive",
+ commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $..arr 3 1 -1", "json.arrindex key $..arr 3 2 -1"},
+ expected: []interface{}{"OK", []interface{}{float64(-1), float64(1), float64(-1)}, []interface{}{float64(-1), float64(-1), float64(-1)}},
assertType: []string{"equal", "deep_equal", "deep_equal"},
cleanUp: []string{"DEL key"},
},
{
- name: "should handle negative start index",
- commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $..arr 3 -1"},
- expected: []interface{}{"OK", []interface{}{float64(2), float64(-1), float64(-1)}},
+ name: "should handle negative start index",
+ commands: []string{"json.set key $ " + nestedArray, "json.arrindex key $..arr 3 -1"},
+ expected: []interface{}{"OK", []interface{}{float64(2), float64(-1), float64(-1)}},
assertType: []string{"equal", "deep_equal"},
cleanUp: []string{"DEL key"},
},
}
runIntegrationTests(t, exec, conn, tests, preTestChecksCommand, postTestChecksCommand)
-}
\ No newline at end of file
+}
diff --git a/integration_tests/commands/websocket/jsondebug_test.go b/integration_tests/commands/websocket/jsondebug_test.go
index 3801b9e52..31073fcae 100644
--- a/integration_tests/commands/websocket/jsondebug_test.go
+++ b/integration_tests/commands/websocket/jsondebug_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/jsonresp_test.go b/integration_tests/commands/websocket/jsonresp_test.go
index b30fd1588..762e46a92 100644
--- a/integration_tests/commands/websocket/jsonresp_test.go
+++ b/integration_tests/commands/websocket/jsonresp_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/main_test.go b/integration_tests/commands/websocket/main_test.go
index 4cd01bde6..de115239c 100644
--- a/integration_tests/commands/websocket/main_test.go
+++ b/integration_tests/commands/websocket/main_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/set_test.go b/integration_tests/commands/websocket/set_test.go
index 8d4ade149..8bbc05e2c 100644
--- a/integration_tests/commands/websocket/set_test.go
+++ b/integration_tests/commands/websocket/set_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
@@ -269,7 +256,8 @@ func TestWithKeepTTLFlag(t *testing.T) {
resp, err := exec.FireCommandAndReadResponse(conn, cmd)
assert.Nil(t, err)
- assert.Equal(t, out, resp, "Value mismatch for cmd %s\n.", cmd)
+ assert.Equal(t, out, resp, "Value mismatch for cmd %s
+.", cmd)
}
}
@@ -277,5 +265,6 @@ func TestWithKeepTTLFlag(t *testing.T) {
cmd := "GET k"
resp, err := exec.FireCommandAndReadResponse(conn, cmd)
assert.Nil(t, err)
- assert.Equal(t, nil, resp, "Value mismatch for cmd %s\n.", cmd)
+ assert.Equal(t, nil, resp, "Value mismatch for cmd %s
+.", cmd)
}
diff --git a/integration_tests/commands/websocket/setup.go b/integration_tests/commands/websocket/setup.go
index ddb1fd184..7560f578f 100644
--- a/integration_tests/commands/websocket/setup.go
+++ b/integration_tests/commands/websocket/setup.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/ttl_pttl_test.go b/integration_tests/commands/websocket/ttl_pttl_test.go
index b6394db49..d6233e295 100644
--- a/integration_tests/commands/websocket/ttl_pttl_test.go
+++ b/integration_tests/commands/websocket/ttl_pttl_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/type_test.go b/integration_tests/commands/websocket/type_test.go
index a25ca16ab..f7fac7211 100644
--- a/integration_tests/commands/websocket/type_test.go
+++ b/integration_tests/commands/websocket/type_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
@@ -73,7 +60,7 @@ func TestType(t *testing.T) {
"ZADD myzetset 1 'one' 2 'two'",
"TYPE myzetset",
},
- expected: []interface{}{float64(2), "zset"},
+ expected: []interface{}{float64(2), "zset"},
},
}
diff --git a/integration_tests/commands/websocket/writeretry_test.go b/integration_tests/commands/websocket/writeretry_test.go
index b2a2feb72..ec86ce2b5 100644
--- a/integration_tests/commands/websocket/writeretry_test.go
+++ b/integration_tests/commands/websocket/writeretry_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/zcard_test.go b/integration_tests/commands/websocket/zcard_test.go
index aab00e6c5..0a68d8e7f 100644
--- a/integration_tests/commands/websocket/zcard_test.go
+++ b/integration_tests/commands/websocket/zcard_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/zpopmax_test.go b/integration_tests/commands/websocket/zpopmax_test.go
index 753dddc3e..d84c09fa4 100644
--- a/integration_tests/commands/websocket/zpopmax_test.go
+++ b/integration_tests/commands/websocket/zpopmax_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/zrank_test.go b/integration_tests/commands/websocket/zrank_test.go
index dc1f496c6..1fdb341a6 100644
--- a/integration_tests/commands/websocket/zrank_test.go
+++ b/integration_tests/commands/websocket/zrank_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/zrem_test.go b/integration_tests/commands/websocket/zrem_test.go
index 242b74b83..a8c1c5b0b 100644
--- a/integration_tests/commands/websocket/zrem_test.go
+++ b/integration_tests/commands/websocket/zrem_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/commands/websocket/zset_test.go b/integration_tests/commands/websocket/zset_test.go
index 30e6ec3b3..68312d1fe 100644
--- a/integration_tests/commands/websocket/zset_test.go
+++ b/integration_tests/commands/websocket/zset_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package websocket
diff --git a/integration_tests/config/config_test.go b/integration_tests/config/config_test.go
index d448f733a..e787ccc68 100644
--- a/integration_tests/config/config_test.go
+++ b/integration_tests/config/config_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package config_test
diff --git a/integration_tests/config/parser_test.go b/integration_tests/config/parser_test.go
index 4e68504d1..4e30eccdb 100644
--- a/integration_tests/config/parser_test.go
+++ b/integration_tests/config/parser_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package config_test
diff --git a/integration_tests/server/max_conn_test.go b/integration_tests/server/max_conn_test.go
index 3f13c4ac3..f868985e1 100644
--- a/integration_tests/server/max_conn_test.go
+++ b/integration_tests/server/max_conn_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package server
diff --git a/integration_tests/server/server_abort_test.go b/integration_tests/server/server_abort_test.go
index d27f4a6b7..d4738832f 100644
--- a/integration_tests/server/server_abort_test.go
+++ b/integration_tests/server/server_abort_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package server
diff --git a/integration_tests/server/setup.go b/integration_tests/server/setup.go
index 9ddbe6b77..e80eb3473 100644
--- a/integration_tests/server/setup.go
+++ b/integration_tests/server/setup.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package server
diff --git a/internal/auth/session.go b/internal/auth/session.go
index a9dad704a..a49051381 100644
--- a/internal/auth/session.go
+++ b/internal/auth/session.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package auth
diff --git a/internal/auth/session_test.go b/internal/auth/session_test.go
index 01ca56fd0..8309e25a4 100644
--- a/internal/auth/session_test.go
+++ b/internal/auth/session_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package auth
diff --git a/internal/cli/cli.go b/internal/cli/cli.go
index 7db447bf3..a48fb527a 100644
--- a/internal/cli/cli.go
+++ b/internal/cli/cli.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package cli
diff --git a/internal/clientio/io.go b/internal/clientio/io.go
index ca34404d0..3f6e79f9b 100644
--- a/internal/clientio/io.go
+++ b/internal/clientio/io.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package clientio
@@ -55,17 +42,22 @@ func NewRESPParserWithBytes(c io.ReadWriter, initBytes []byte) *RESPParser {
}
func (rp *RESPParser) DecodeOne() (interface{}, error) {
- // Read data until we find \r\n or hit an error/EOF
+ // Read data until we find
+ or hit an error/EOF
//revive:disable:empty-block
//revive:disable:empty-lines
for {
- // 1. Check if the accumulated buffer (rp.buf) contains \r\n before reading
- // more data. This ensures the function does not hang if \r\n is split
+ // 1. Check if the accumulated buffer (rp.buf) contains
+ before reading
+ // more data. This ensures the function does not hang if
+ is split
// across multiple reads.
- // 2. Check presence of \r\n in the accumulated buffer (rp.buf.Bytes())
+ // 2. Check presence of
+ in the accumulated buffer (rp.buf.Bytes())
// rather than the temporary buffer (rp.tbuf). This ensures that data read
// across multiple iterations of the loop is correctly considered.
- if rp.buf.Len() > 0 && bytes.Contains(rp.buf.Bytes(), []byte{'\r', '\n'}) {
+ if rp.buf.Len() > 0 && bytes.Contains(rp.buf.Bytes(), []byte{'
', '
+'}) {
break
}
diff --git a/internal/clientio/io_test.go b/internal/clientio/io_test.go
index 1f1035d02..794914645 100644
--- a/internal/clientio/io_test.go
+++ b/internal/clientio/io_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package clientio
@@ -83,7 +70,9 @@ func equalArrays(a, b interface{}) bool {
// Test cases for RESPParser
func TestDecodeMultiple(t *testing.T) {
- mockRW := &MockReadWriter{ReadChunks: [][]byte{[]byte("+OK\r\n+PONG\r\n")}}
+ mockRW := &MockReadWriter{ReadChunks: [][]byte{[]byte("+OK
++PONG
+")}}
parser := NewRESPParser(mockRW)
results, err := parser.DecodeMultiple()
if err != nil {
@@ -96,7 +85,9 @@ func TestDecodeMultiple(t *testing.T) {
}
func TestDecodeOneCrossProtocolScripting(t *testing.T) {
- mockRW := &MockReadWriter{ReadChunks: [][]byte{[]byte("GET / HTTP/1.1\r\n\r\n")}}
+ mockRW := &MockReadWriter{ReadChunks: [][]byte{[]byte("GET / HTTP/1.1
+
+")}}
parser := NewRESPParser(mockRW)
_, err := parser.DecodeOne()
if err == nil || err.Error() != "possible cross protocol scripting attack detected" {
@@ -108,8 +99,10 @@ func TestDecodeOneSplitBuffers(t *testing.T) {
// Simulate a bulk string message split across two buffers
mockRW := &MockReadWriter{
ReadChunks: [][]byte{
- []byte("$6\r\nfoo"),
- []byte("bar\r\n"),
+ []byte("$6
+foo"),
+ []byte("bar
+"),
},
}
parser := NewRESPParser(mockRW)
@@ -137,9 +130,11 @@ func TestDecodeOneHighVolumeData(t *testing.T) {
largeString := bytes.Repeat([]byte("a"), 10*config.DiceConfig.Network.IOBufferLength)
mockRW := &MockReadWriter{
ReadChunks: [][]byte{
- []byte("$" + strconv.Itoa(len(largeString)) + "\r\n"),
+ []byte("$" + strconv.Itoa(len(largeString)) + "
+"),
largeString,
- []byte("\r\n"),
+ []byte("
+"),
},
}
parser := NewRESPParser(mockRW)
@@ -155,7 +150,15 @@ func TestDecodeOneHighVolumeData(t *testing.T) {
func TestDecodeOneNestedArrays(t *testing.T) {
mockRW := &MockReadWriter{
ReadChunks: [][]byte{
- []byte("*2\r\n*2\r\n$3\r\nfoo\r\n$3\r\nbar\r\n$3\r\nbaz\r\n"),
+ []byte("*2
+*2
+$3
+foo
+$3
+bar
+$3
+baz
+"),
},
}
parser := NewRESPParser(mockRW)
@@ -175,8 +178,10 @@ func TestDecodeOneNestedArrays(t *testing.T) {
func TestDecodeOnePartialMessages(t *testing.T) {
mockRW := &MockReadWriter{
ReadChunks: [][]byte{
- []byte("$6\r\nfoo"),
- []byte("bar\r\n"),
+ []byte("$6
+foo"),
+ []byte("bar
+"),
},
}
parser := NewRESPParser(mockRW)
@@ -194,9 +199,11 @@ func TestDecodeOneVeryLargeMessage(t *testing.T) {
largeString := bytes.Repeat([]byte("a"), 10*config.DiceConfig.Network.IOBufferLength)
mockRW := &MockReadWriter{
ReadChunks: [][]byte{
- []byte("$" + strconv.Itoa(len(largeString)) + "\r\n"),
+ []byte("$" + strconv.Itoa(len(largeString)) + "
+"),
largeString,
- []byte("\r\n"),
+ []byte("
+"),
},
}
parser := NewRESPParser(mockRW)
diff --git a/internal/clientio/iohandler/iohandler.go b/internal/clientio/iohandler/iohandler.go
index c922e09b2..4445cb5bf 100644
--- a/internal/clientio/iohandler/iohandler.go
+++ b/internal/clientio/iohandler/iohandler.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package iohandler
diff --git a/internal/clientio/iohandler/netconn/netconn.go b/internal/clientio/iohandler/netconn/netconn.go
index 309bcd86a..23432cc90 100644
--- a/internal/clientio/iohandler/netconn/netconn.go
+++ b/internal/clientio/iohandler/netconn/netconn.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package netconn
diff --git a/internal/clientio/iohandler/netconn/netconn_resp_test.go b/internal/clientio/iohandler/netconn/netconn_resp_test.go
index aa4a67c6c..8f94ca920 100644
--- a/internal/clientio/iohandler/netconn/netconn_resp_test.go
+++ b/internal/clientio/iohandler/netconn/netconn_resp_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package netconn
@@ -43,128 +30,331 @@ func TestNetConnIOHandler_RESP(t *testing.T) {
}{
{
name: "Simple String",
- input: "+OK\r\n",
- expectedRead: "+OK\r\n",
- writeResponse: "+OK\r\n",
- expectedWrite: "+OK\r\n",
+ input: "+OK
+",
+ expectedRead: "+OK
+",
+ writeResponse: "+OK
+",
+ expectedWrite: "+OK
+",
},
{
name: "Error",
- input: "-Error message\r\n",
- expectedRead: "-Error message\r\n",
- writeResponse: "-ERR unknown command 'FOOBAR'\r\n",
- expectedWrite: "-ERR unknown command 'FOOBAR'\r\n",
+ input: "-Error message
+",
+ expectedRead: "-Error message
+",
+ writeResponse: "-ERR unknown command 'FOOBAR'
+",
+ expectedWrite: "-ERR unknown command 'FOOBAR'
+",
},
{
name: "Integer",
- input: ":1000\r\n",
- expectedRead: ":1000\r\n",
- writeResponse: ":1000\r\n",
- expectedWrite: ":1000\r\n",
+ input: ":1000
+",
+ expectedRead: ":1000
+",
+ writeResponse: ":1000
+",
+ expectedWrite: ":1000
+",
},
{
name: "Bulk String",
- input: "$5\r\nhello\r\n",
- expectedRead: "$5\r\nhello\r\n",
- writeResponse: "$5\r\nworld\r\n",
- expectedWrite: "$5\r\nworld\r\n",
+ input: "$5
+hello
+",
+ expectedRead: "$5
+hello
+",
+ writeResponse: "$5
+world
+",
+ expectedWrite: "$5
+world
+",
},
{
name: "Null Bulk String",
- input: "$-1\r\n",
- expectedRead: "$-1\r\n",
- writeResponse: "$-1\r\n",
- expectedWrite: "$-1\r\n",
+ input: "$-1
+",
+ expectedRead: "$-1
+",
+ writeResponse: "$-1
+",
+ expectedWrite: "$-1
+",
},
{
name: "Empty Bulk String",
- input: "$0\r\n\r\n",
- expectedRead: "$0\r\n\r\n",
- writeResponse: "$0\r\n\r\n",
- expectedWrite: "$0\r\n\r\n",
+ input: "$0
+
+",
+ expectedRead: "$0
+
+",
+ writeResponse: "$0
+
+",
+ expectedWrite: "$0
+
+",
},
{
name: "Array",
- input: "*2\r\n$5\r\nhello\r\n$5\r\nworld\r\n",
- expectedRead: "*2\r\n$5\r\nhello\r\n$5\r\nworld\r\n",
- writeResponse: "*2\r\n$5\r\nhello\r\n$5\r\nworld\r\n",
- expectedWrite: "*2\r\n$5\r\nhello\r\n$5\r\nworld\r\n",
+ input: "*2
+$5
+hello
+$5
+world
+",
+ expectedRead: "*2
+$5
+hello
+$5
+world
+",
+ writeResponse: "*2
+$5
+hello
+$5
+world
+",
+ expectedWrite: "*2
+$5
+hello
+$5
+world
+",
},
{
name: "Empty Array",
- input: "*0\r\n",
- expectedRead: "*0\r\n",
- writeResponse: "*0\r\n",
- expectedWrite: "*0\r\n",
+ input: "*0
+",
+ expectedRead: "*0
+",
+ writeResponse: "*0
+",
+ expectedWrite: "*0
+",
},
{
name: "Null Array",
- input: "*-1\r\n",
- expectedRead: "*-1\r\n",
- writeResponse: "*-1\r\n",
- expectedWrite: "*-1\r\n",
+ input: "*-1
+",
+ expectedRead: "*-1
+",
+ writeResponse: "*-1
+",
+ expectedWrite: "*-1
+",
},
{
name: "Nested Array",
- input: "*2\r\n*2\r\n+foo\r\n+bar\r\n*2\r\n+hello\r\n+world\r\n",
- expectedRead: "*2\r\n*2\r\n+foo\r\n+bar\r\n*2\r\n+hello\r\n+world\r\n",
- writeResponse: "*2\r\n*2\r\n+foo\r\n+bar\r\n*2\r\n+hello\r\n+world\r\n",
- expectedWrite: "*2\r\n*2\r\n+foo\r\n+bar\r\n*2\r\n+hello\r\n+world\r\n",
+ input: "*2
+*2
++foo
++bar
+*2
++hello
++world
+",
+ expectedRead: "*2
+*2
++foo
++bar
+*2
++hello
++world
+",
+ writeResponse: "*2
+*2
++foo
++bar
+*2
++hello
++world
+",
+ expectedWrite: "*2
+*2
++foo
++bar
+*2
++hello
++world
+",
},
{
name: "SET command",
- input: "*3\r\n$3\r\nSET\r\n$3\r\nkey\r\n$5\r\nvalue\r\n",
- expectedRead: "*3\r\n$3\r\nSET\r\n$3\r\nkey\r\n$5\r\nvalue\r\n",
- writeResponse: "+OK\r\n",
- expectedWrite: "+OK\r\n",
+ input: "*3
+$3
+SET
+$3
+key
+$5
+value
+",
+ expectedRead: "*3
+$3
+SET
+$3
+key
+$5
+value
+",
+ writeResponse: "+OK
+",
+ expectedWrite: "+OK
+",
},
{
name: "GET command",
- input: "*2\r\n$3\r\nGET\r\n$3\r\nkey\r\n",
- expectedRead: "*2\r\n$3\r\nGET\r\n$3\r\nkey\r\n",
- writeResponse: "$5\r\nvalue\r\n",
- expectedWrite: "$5\r\nvalue\r\n",
+ input: "*2
+$3
+GET
+$3
+key
+",
+ expectedRead: "*2
+$3
+GET
+$3
+key
+",
+ writeResponse: "$5
+value
+",
+ expectedWrite: "$5
+value
+",
},
{
name: "LPUSH command",
- input: "*4\r\n$5\r\nLPUSH\r\n$4\r\nlist\r\n$5\r\nvalue\r\n$6\r\nvalue2\r\n",
- expectedRead: "*4\r\n$5\r\nLPUSH\r\n$4\r\nlist\r\n$5\r\nvalue\r\n$6\r\nvalue2\r\n",
- writeResponse: ":2\r\n",
- expectedWrite: ":2\r\n",
+ input: "*4
+$5
+LPUSH
+$4
+list
+$5
+value
+$6
+value2
+",
+ expectedRead: "*4
+$5
+LPUSH
+$4
+list
+$5
+value
+$6
+value2
+",
+ writeResponse: ":2
+",
+ expectedWrite: ":2
+",
},
{
name: "HMSET command",
- input: "*6\r\n$5\r\nHMSET\r\n$4\r\nhash\r\n$5\r\nfield\r\n$5\r\nvalue\r\n$6\r\nfield2\r\n$6\r\nvalue2\r\n",
- expectedRead: "*6\r\n$5\r\nHMSET\r\n$4\r\nhash\r\n$5\r\nfield\r\n$5\r\nvalue\r\n$6\r\nfield2\r\n$6\r\nvalue2\r\n",
- writeResponse: "+OK\r\n",
- expectedWrite: "+OK\r\n",
+ input: "*6
+$5
+HMSET
+$4
+hash
+$5
+field
+$5
+value
+$6
+field2
+$6
+value2
+",
+ expectedRead: "*6
+$5
+HMSET
+$4
+hash
+$5
+field
+$5
+value
+$6
+field2
+$6
+value2
+",
+ writeResponse: "+OK
+",
+ expectedWrite: "+OK
+",
},
{
name: "Partial read",
- input: "*2\r\n$5\r\nhello\r\n$5\r\nwor",
- expectedRead: "*2\r\n$5\r\nhello\r\n$5\r\nwor",
- writeResponse: "+OK\r\n",
- expectedWrite: "+OK\r\n",
+ input: "*2
+$5
+hello
+$5
+wor",
+ expectedRead: "*2
+$5
+hello
+$5
+wor",
+ writeResponse: "+OK
+",
+ expectedWrite: "+OK
+",
},
{
name: "Read error",
- input: "*2\r\n$5\r\nhello\r\n$5\r\nworld\r\n",
+ input: "*2
+$5
+hello
+$5
+world
+",
readErr: errors.New("read error"),
expectedReadErr: errors.New("error reading request: read error"),
},
{
name: "Write error",
- input: "*2\r\n$5\r\nhello\r\n$5\r\nworld\r\n",
- expectedRead: "*2\r\n$5\r\nhello\r\n$5\r\nworld\r\n",
- writeResponse: strings.Repeat("Hello, World!\r\n", 100),
+ input: "*2
+$5
+hello
+$5
+world
+",
+ expectedRead: "*2
+$5
+hello
+$5
+world
+",
+ writeResponse: strings.Repeat("Hello, World!
+", 100),
writeErr: errors.New("write error"),
expectedWriteErr: errors.New("error writing response: write error"),
},
{
name: "Write error",
- input: "*2\r\n$5\r\nhello\r\n$5\r\nworld\r\n",
- expectedRead: "*2\r\n$5\r\nhello\r\n$5\r\nworld\r\n",
- writeResponse: "Hello, World!\r\n",
+ input: "*2
+$5
+hello
+$5
+world
+",
+ expectedRead: "*2
+$5
+hello
+$5
+world
+",
+ writeResponse: "Hello, World!
+",
writeErr: errors.New("write error"),
expectedWriteErr: errors.New("error writing response: write error"),
},
diff --git a/internal/clientio/iohandler/netconn/netconn_test.go b/internal/clientio/iohandler/netconn/netconn_test.go
index 1c6056a9c..48d357578 100644
--- a/internal/clientio/iohandler/netconn/netconn_test.go
+++ b/internal/clientio/iohandler/netconn/netconn_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package netconn
@@ -97,41 +84,55 @@ func TestNetConnIOHandler(t *testing.T) {
}{
{
name: "Simple read and write",
- readData: []byte("Hello, World!\r\n"),
- expectedRead: []byte("Hello, World!\r\n"),
- expectedWrite: []byte("Response\r\n"),
+ readData: []byte("Hello, World!
+"),
+ expectedRead: []byte("Hello, World!
+"),
+ expectedWrite: []byte("Response
+"),
},
{
name: "Read error",
readErr: errors.New("read error"),
expectedReadErr: errors.New("error reading request: read error"),
- expectedWrite: []byte("Response\r\n"),
+ expectedWrite: []byte("Response
+"),
},
{
name: "Write error",
- readData: []byte("Hello, World!\r\n"),
- expectedRead: []byte("Hello, World!\r\n"),
+ readData: []byte("Hello, World!
+"),
+ expectedRead: []byte("Hello, World!
+"),
writeErr: errors.New("write error"),
- response: []byte("Hello, World!\r\n"),
+ response: []byte("Hello, World!
+"),
expectedWriteErr: errors.New("error writing response: write error"),
},
{
name: "Large data read",
readData: bytes.Repeat([]byte("a"), 1000),
expectedRead: bytes.Repeat([]byte("a"), 1000),
- expectedWrite: []byte("Response\r\n"),
+ expectedWrite: []byte("Response
+"),
},
{
name: "Empty read",
readData: []byte{},
expectedReadErr: io.EOF,
- expectedWrite: []byte("Response\r\n"),
+ expectedWrite: []byte("Response
+"),
},
{
name: "Read with multiple chunks",
- readData: []byte("Hello\r\nWorld\r\n"),
- expectedRead: []byte("Hello\r\nWorld\r\n"),
- expectedWrite: []byte("Response\r\n"),
+ readData: []byte("Hello
+World
+"),
+ expectedRead: []byte("Hello
+World
+"),
+ expectedWrite: []byte("Response
+"),
},
}
@@ -174,7 +175,8 @@ func TestNetConnIOHandler(t *testing.T) {
// Test WriteResponse
if tt.response == nil {
- tt.response = []byte("Response\r\n")
+ tt.response = []byte("Response
+")
}
err = handler.Write(ctx, tt.response)
diff --git a/internal/clientio/requestparser/parser.go b/internal/clientio/requestparser/parser.go
index ac0143c79..8751cb679 100644
--- a/internal/clientio/requestparser/parser.go
+++ b/internal/clientio/requestparser/parser.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package requestparser
diff --git a/internal/clientio/requestparser/resp/respparser.go b/internal/clientio/requestparser/resp/respparser.go
index d379a69f9..fb08c212e 100644
--- a/internal/clientio/requestparser/resp/respparser.go
+++ b/internal/clientio/requestparser/resp/respparser.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package respparser
@@ -45,7 +32,8 @@ var (
)
// CRLF is the line delimiter in RESP
-var CRLF = []byte{'\r', '\n'}
+var CRLF = []byte{'
', '
+'}
// Parser is responsible for parsing RESP protocol data
type Parser struct {
diff --git a/internal/clientio/requestparser/resp/respparser_test.go b/internal/clientio/requestparser/resp/respparser_test.go
index e6987bc8e..3187f4d2c 100644
--- a/internal/clientio/requestparser/resp/respparser_test.go
+++ b/internal/clientio/requestparser/resp/respparser_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package respparser
@@ -32,21 +19,45 @@ func TestParser_Parse(t *testing.T) {
}{
{
name: "Simple SET command",
- input: "*3\r\n$3\r\nSET\r\n$3\r\nkey\r\n$5\r\nvalue\r\n",
+ input: "*3
+$3
+SET
+$3
+key
+$5
+value
+",
want: []*cmd.DiceDBCmd{
{Cmd: "SET", Args: []string{"key", "value"}},
},
},
{
name: "GET command",
- input: "*2\r\n$3\r\nGET\r\n$3\r\nkey\r\n",
+ input: "*2
+$3
+GET
+$3
+key
+",
want: []*cmd.DiceDBCmd{
{Cmd: "GET", Args: []string{"key"}},
},
},
{
name: "Multiple commands",
- input: "*2\r\n$4\r\nPING\r\n$4\r\nPONG\r\n*3\r\n$3\r\nSET\r\n$3\r\nkey\r\n$5\r\nvalue\r\n",
+ input: "*2
+$4
+PING
+$4
+PONG
+*3
+$3
+SET
+$3
+key
+$5
+value
+",
want: []*cmd.DiceDBCmd{
{Cmd: "PING", Args: []string{"PONG"}},
{Cmd: "SET", Args: []string{"key", "value"}},
@@ -54,86 +65,163 @@ func TestParser_Parse(t *testing.T) {
},
{
name: "Command with integer argument",
- input: "*3\r\n$6\r\nEXPIRE\r\n$3\r\nkey\r\n:60\r\n",
+ input: "*3
+$6
+EXPIRE
+$3
+key
+:60
+",
want: []*cmd.DiceDBCmd{
{Cmd: "EXPIRE", Args: []string{"key", "60"}},
},
},
{
name: "Invalid command (not an array)",
- input: "NOT AN ARRAY\r\n",
+ input: "NOT AN ARRAY
+",
wantErr: true,
},
{
name: "Empty command",
- input: "*0\r\n",
+ input: "*0
+",
wantErr: true,
},
{
name: "Command with null bulk string argument",
- input: "*3\r\n$3\r\nSET\r\n$3\r\nkey\r\n$-1\r\n",
+ input: "*3
+$3
+SET
+$3
+key
+$-1
+",
want: []*cmd.DiceDBCmd{
{Cmd: "SET", Args: []string{"key", "(nil)"}},
},
},
{
name: "Command with Simple String argument",
- input: "*3\r\n$3\r\nSET\r\n$3\r\nkey\r\n+OK\r\n",
+ input: "*3
+$3
+SET
+$3
+key
++OK
+",
want: []*cmd.DiceDBCmd{
{Cmd: "SET", Args: []string{"key", "OK"}},
},
},
{
name: "Command with Error argument",
- input: "*3\r\n$3\r\nSET\r\n$3\r\nkey\r\n-ERR Invalid argument\r\n",
+ input: "*3
+$3
+SET
+$3
+key
+-ERR Invalid argument
+",
want: []*cmd.DiceDBCmd{
{Cmd: "SET", Args: []string{"key", "ERR Invalid argument"}},
},
},
{
name: "Command with mixed argument types",
- input: "*5\r\n$4\r\nMSET\r\n$3\r\nkey\r\n$5\r\nvalue\r\n:1000\r\n+OK\r\n",
+ input: "*5
+$4
+MSET
+$3
+key
+$5
+value
+:1000
++OK
+",
want: []*cmd.DiceDBCmd{
{Cmd: "MSET", Args: []string{"key", "value", "1000", "OK"}},
},
},
{
name: "Invalid array length",
- input: "*-2\r\n$3\r\nSET\r\n$3\r\nkey\r\n$5\r\nvalue\r\n",
+ input: "*-2
+$3
+SET
+$3
+key
+$5
+value
+",
wantErr: true,
},
{
name: "Incomplete command",
- input: "*3\r\n$3\r\nSET\r\n$3\r\nkey\r\n",
+ input: "*3
+$3
+SET
+$3
+key
+",
wantErr: true,
},
{
name: "Command with empty bulk string",
- input: "*3\r\n$3\r\nSET\r\n$3\r\nkey\r\n$0\r\n\r\n",
+ input: "*3
+$3
+SET
+$3
+key
+$0
+
+",
want: []*cmd.DiceDBCmd{
{Cmd: "SET", Args: []string{"key", ""}},
},
},
{
name: "Invalid bulk string length",
- input: "*3\r\n$3\r\nSET\r\n$3\r\nkey\r\n$-2\r\nvalue\r\n",
+ input: "*3
+$3
+SET
+$3
+key
+$-2
+value
+",
wantErr: true,
},
{
name: "Non-integer bulk string length",
- input: "*3\r\n$3\r\nSET\r\n$3\r\nkey\r\n$abc\r\nvalue\r\n",
+ input: "*3
+$3
+SET
+$3
+key
+$abc
+value
+",
wantErr: true,
},
{
name: "Large bulk string",
- input: "*2\r\n$4\r\nECHO\r\n$1000\r\n" + string(make([]byte, 1000)) + "\r\n",
+ input: "*2
+$4
+ECHO
+$1000
+" + string(make([]byte, 1000)) + "
+",
want: []*cmd.DiceDBCmd{
{Cmd: "ECHO", Args: []string{string(make([]byte, 1000))}},
},
},
{
name: "Incomplete CRLF",
- input: "*2\r\n$4\r\nECHO\r\n$5\r\nhello\r",
+ input: "*2
+$4
+ECHO
+$5
+hello
",
wantErr: true,
},
}
@@ -160,12 +248,16 @@ func TestParser_parseSimpleString(t *testing.T) {
want string
wantErr bool
}{
- {"Valid simple string", "+OK\r\n", "OK", false},
- {"Empty simple string", "+\r\n", "", false},
- {"Simple string with spaces", "+Hello World\r\n", "Hello World", false},
+ {"Valid simple string", "+OK
+", "OK", false},
+ {"Empty simple string", "+
+", "", false},
+ {"Simple string with spaces", "+Hello World
+", "Hello World", false},
{"Incomplete simple string", "+OK", "", true},
- {"Missing CR", "+OK\n", "", true},
- {"Missing LF", "+OK\r", "", true},
+ {"Missing CR", "+OK
+", "", true},
+ {"Missing LF", "+OK
", "", true},
}
for _, tt := range tests {
@@ -190,12 +282,16 @@ func TestParser_parseError(t *testing.T) {
want string
wantErr bool
}{
- {"Valid error", "-Error message\r\n", "Error message", false},
- {"Empty error", "-\r\n", "", false},
- {"Error with spaces", "-ERR unknown command\r\n", "ERR unknown command", false},
+ {"Valid error", "-Error message
+", "Error message", false},
+ {"Empty error", "-
+", "", false},
+ {"Error with spaces", "-ERR unknown command
+", "ERR unknown command", false},
{"Incomplete error", "-Error", "", true},
- {"Missing CR", "-Error\n", "", true},
- {"Missing LF", "-Error\r", "", true},
+ {"Missing CR", "-Error
+", "", true},
+ {"Missing LF", "-Error
", "", true},
}
for _, tt := range tests {
@@ -220,15 +316,22 @@ func TestParser_parseInteger(t *testing.T) {
want int64
wantErr bool
}{
- {"Valid positive integer", ":1000\r\n", 1000, false},
- {"Valid negative integer", ":-1000\r\n", -1000, false},
- {"Zero", ":0\r\n", 0, false},
- {"Large integer", ":9223372036854775807\r\n", 9223372036854775807, false},
- {"Invalid integer (float)", ":3.14\r\n", 0, true},
- {"Invalid integer (text)", ":abc\r\n", 0, true},
+ {"Valid positive integer", ":1000
+", 1000, false},
+ {"Valid negative integer", ":-1000
+", -1000, false},
+ {"Zero", ":0
+", 0, false},
+ {"Large integer", ":9223372036854775807
+", 9223372036854775807, false},
+ {"Invalid integer (float)", ":3.14
+", 0, true},
+ {"Invalid integer (text)", ":abc
+", 0, true},
{"Incomplete integer", ":123", 0, true},
- {"Missing CR", ":123\n", 0, true},
- {"Missing LF", ":123\r", 0, true},
+ {"Missing CR", ":123
+", 0, true},
+ {"Missing LF", ":123
", 0, true},
}
for _, tt := range tests {
@@ -253,16 +356,33 @@ func TestParser_parseBulkString(t *testing.T) {
want string
wantErr bool
}{
- {"Valid bulk string", "$5\r\nhello\r\n", "hello", false},
- {"Empty bulk string", "$0\r\n\r\n", "", false},
- {"Null bulk string", "$-1\r\n", "(nil)", false},
- {"Bulk string with spaces", "$11\r\nhello world\r\n", "hello world", false},
- {"Invalid length (negative)", "$-2\r\nhello\r\n", "", true},
- {"Invalid length (non-numeric)", "$abc\r\nhello\r\n", "", true},
- {"Incomplete bulk string", "$5\r\nhell", "", true},
- {"Missing CR", "$5\r\nhello\n", "", true},
- {"Missing LF", "$5\r\nhello\r", "", true},
- {"Length mismatch", "$4\r\nhello\r\n", "", true},
+ {"Valid bulk string", "$5
+hello
+", "hello", false},
+ {"Empty bulk string", "$0
+
+", "", false},
+ {"Null bulk string", "$-1
+", "(nil)", false},
+ {"Bulk string with spaces", "$11
+hello world
+", "hello world", false},
+ {"Invalid length (negative)", "$-2
+hello
+", "", true},
+ {"Invalid length (non-numeric)", "$abc
+hello
+", "", true},
+ {"Incomplete bulk string", "$5
+hell", "", true},
+ {"Missing CR", "$5
+hello
+", "", true},
+ {"Missing LF", "$5
+hello
", "", true},
+ {"Length mismatch", "$4
+hello
+", "", true},
}
for _, tt := range tests {
@@ -289,47 +409,74 @@ func TestParser_parseArray(t *testing.T) {
}{
{
name: "Valid array",
- input: "*2\r\n$5\r\nhello\r\n$5\r\nworld\r\n",
+ input: "*2
+$5
+hello
+$5
+world
+",
want: []string{"hello", "world"},
},
{
name: "Empty array",
- input: "*0\r\n",
+ input: "*0
+",
wantErr: true,
},
{
name: "Null array",
- input: "*-1\r\n",
+ input: "*-1
+",
wantErr: true,
},
{
name: "Array with mixed types",
- input: "*3\r\n:1\r\n$5\r\nhello\r\n+world\r\n",
+ input: "*3
+:1
+$5
+hello
++world
+",
want: []string{"1", "hello", "world"},
},
{
name: "Invalid array length",
- input: "*-2\r\n",
+ input: "*-2
+",
wantErr: true,
},
{
name: "Non-numeric array length",
- input: "*abc\r\n",
+ input: "*abc
+",
wantErr: true,
},
{
name: "Array length mismatch (too few elements)",
- input: "*3\r\n$5\r\nhello\r\n$5\r\nworld\r\n",
+ input: "*3
+$5
+hello
+$5
+world
+",
wantErr: true,
},
{
name: "Array length mismatch (too many elements)",
- input: "*1\r\n$5\r\nhello\r\n$5\r\nworld\r\n",
+ input: "*1
+$5
+hello
+$5
+world
+",
want: []string{"hello"}, // Truncated parsing
},
{
name: "Incomplete array",
- input: "*2\r\n$5\r\nhello\r\n",
+ input: "*2
+$5
+hello
+",
wantErr: true,
},
}
diff --git a/internal/clientio/resp.go b/internal/clientio/resp.go
index 8224bc81f..86dc4c619 100644
--- a/internal/clientio/resp.go
+++ b/internal/clientio/resp.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package clientio
@@ -44,14 +31,22 @@ const (
EmptyArray // Represents an empty array in RESP format.
)
-var RespNIL = []byte("$-1\r\n")
-var RespOK = []byte("+OK\r\n")
-var RespQueued = []byte("+QUEUED\r\n")
-var RespZero = []byte(":0\r\n")
-var RespOne = []byte(":1\r\n")
-var RespMinusOne = []byte(":-1\r\n")
-var RespMinusTwo = []byte(":-2\r\n")
-var RespEmptyArray = []byte("*0\r\n")
+var RespNIL = []byte("$-1
+")
+var RespOK = []byte("+OK
+")
+var RespQueued = []byte("+QUEUED
+")
+var RespZero = []byte(":0
+")
+var RespOne = []byte(":1
+")
+var RespMinusOne = []byte(":-1
+")
+var RespMinusTwo = []byte(":-2
+")
+var RespEmptyArray = []byte("*0
+")
func readLength(buf *bytes.Buffer) (int64, error) {
s, err := readStringUntilSr(buf)
@@ -78,15 +73,18 @@ func readStringUntilSr(buf *bytes.Buffer) (string, error) {
result = append(result, byteRead)
- // If we find '\r', we check the next byte for '\n'
- if byteRead == '\r' {
+ // If we find '
', we check the next byte for '
+'
+ if byteRead == '
' {
nextByte, err := buf.ReadByte() // Peek the next byte
if err != nil {
return utils.EmptyStr, err
}
- // If the next byte is '\n', we've found a valid end of string
- if nextByte == '\n' {
+ // If the next byte is '
+', we've found a valid end of string
+ if nextByte == '
+' {
break
}
@@ -94,7 +92,7 @@ func readStringUntilSr(buf *bytes.Buffer) (string, error) {
result = append(result, nextByte)
}
}
- // Return without the last '\r'
+ // Return without the last '
'
return string(result[:len(result)-1]), nil
}
@@ -147,7 +145,8 @@ func readBulkString(c io.ReadWriter, buf *bytes.Buffer) (string, error) {
return "(nil)", nil
}
- bytesRem := l + 2 // 2 for \r\n
+ bytesRem := l + 2 // 2 for
+
bytesRem -= int64(buf.Len())
for bytesRem > 0 {
tbuf := make([]byte, bytesRem)
@@ -164,7 +163,8 @@ func readBulkString(c io.ReadWriter, buf *bytes.Buffer) (string, error) {
return utils.EmptyStr, err
}
- // moving buffer pointer by 2 for \r and \n
+ // moving buffer pointer by 2 for
and
+
if _, err := buf.ReadByte(); err != nil {
return utils.EmptyStr, err
}
@@ -198,12 +198,15 @@ func readArray(buf *bytes.Buffer, rp *RESPParser) (interface{}, error) {
}
func encodeString(v string) []byte {
- return []byte(fmt.Sprintf("$%d\r\n%s\r\n", len(v), v))
+ return []byte(fmt.Sprintf("$%d
+%s
+", len(v), v))
}
// encodeBool encodes bool as simple strings
func encodeBool(v bool) []byte {
- return []byte(fmt.Sprintf("+%t\r\n", v))
+ return []byte(fmt.Sprintf("+%t
+", v))
}
func Encode(value interface{}, isSimple bool) []byte {
@@ -220,12 +223,14 @@ func Encode(value interface{}, isSimple bool) []byte {
case string:
// encode as simple strings
if isSimple || v == "[" || v == "{" {
- return []byte(fmt.Sprintf("+%s\r\n", v))
+ return []byte(fmt.Sprintf("+%s
+", v))
}
// encode as bulk strings
return encodeString(v)
case int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64:
- return []byte(fmt.Sprintf(":%d\r\n", v)) // Prefix with ':' for RESP integers.
+ return []byte(fmt.Sprintf(":%d
+", v)) // Prefix with ':' for RESP integers.
// Handle floating-point types similarly to integers.
case float32, float64:
@@ -235,7 +240,8 @@ func Encode(value interface{}, isSimple bool) []byte {
// Therefore, we need to check if value is an integer
intValue, isInteger := utils.IsFloatToIntPossible(v.(float64))
if isInteger {
- return []byte(fmt.Sprintf(":%d\r\n", intValue))
+ return []byte(fmt.Sprintf(":%d
+", intValue))
}
// if it is a float, encode like a string
@@ -249,7 +255,8 @@ func Encode(value interface{}, isSimple bool) []byte {
for _, b := range value.([]string) {
buf.Write(encodeString(b)) // Encode each string and write to the buffer.
}
- return []byte(fmt.Sprintf("*%d\r\n%s", len(v), buf.Bytes())) // Return the encoded response.
+ return []byte(fmt.Sprintf("*%d
+%s", len(v), buf.Bytes())) // Return the encoded response.
// Handle slices of custom objects (Obj).
case []*object.Obj:
@@ -258,7 +265,8 @@ func Encode(value interface{}, isSimple bool) []byte {
for _, b := range value.([]*object.Obj) {
buf.Write(Encode(b.Value, false)) // Encode each object’s value and write to the buffer.
}
- return []byte(fmt.Sprintf("*%d\r\n%s", len(v), buf.Bytes())) // Return the encoded response.
+ return []byte(fmt.Sprintf("*%d
+%s", len(v), buf.Bytes())) // Return the encoded response.
// Handle slices of interfaces.
case []interface{}:
@@ -267,7 +275,8 @@ func Encode(value interface{}, isSimple bool) []byte {
for _, elem := range v {
buf.Write(Encode(elem, false)) // Encode each element and write to the buffer.
}
- return []byte(fmt.Sprintf("*%d\r\n%s", len(v), buf.Bytes())) // Return the encoded response.
+ return []byte(fmt.Sprintf("*%d
+%s", len(v), buf.Bytes())) // Return the encoded response.
// Handle slices of int64.
case []int64:
@@ -276,7 +285,8 @@ func Encode(value interface{}, isSimple bool) []byte {
for _, b := range value.([]int64) {
buf.Write(Encode(b, false)) // Encode each int64 and write to the buffer.
}
- return []byte(fmt.Sprintf("*%d\r\n%s", len(v), buf.Bytes())) // Return the encoded response.
+ return []byte(fmt.Sprintf("*%d
+%s", len(v), buf.Bytes())) // Return the encoded response.
case []uint64:
var b []byte
@@ -284,18 +294,21 @@ func Encode(value interface{}, isSimple bool) []byte {
for _, b := range value.([]uint64) {
buf.Write(Encode(b, false)) // Encode each uint64 and write to the buffer.
}
- return []byte(fmt.Sprintf("*%d\r\n%s", len(v), buf.Bytes())) // Return the encoded response.
+ return []byte(fmt.Sprintf("*%d
+%s", len(v), buf.Bytes())) // Return the encoded response.
// Handle error type by formatting it as a RESP error.
case error:
- return []byte(fmt.Sprintf("-%s\r\n", v))
+ return []byte(fmt.Sprintf("-%s
+", v))
case dstore.QueryWatchEvent:
var b []byte
buf := bytes.NewBuffer(b)
we := value.(dstore.QueryWatchEvent)
buf.Write(Encode(fmt.Sprintf("key:%s", we.Key), false))
buf.Write(Encode(fmt.Sprintf("op:%s", we.Operation), false))
- return []byte(fmt.Sprintf("*2\r\n%s", buf.Bytes()))
+ return []byte(fmt.Sprintf("*2
+%s", buf.Bytes()))
// Handle map[string]bool and return a nil response indicating unsupported types.
case map[string]bool:
diff --git a/internal/clientio/resp_test.go b/internal/clientio/resp_test.go
index 9e5376e34..cac9a8bd2 100644
--- a/internal/clientio/resp_test.go
+++ b/internal/clientio/resp_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package clientio_test
@@ -38,9 +25,12 @@ func init() {
func TestSimpleStringDecode(t *testing.T) {
cases := map[string]string{
- "+OK\r\n": "OK",
- "+Hello\rWorld\r\n": "Hello\rWorld",
- "+Hello\rWorld\rAgain\r\n": "Hello\rWorld\rAgain",
+ "+OK
+": "OK",
+ "+Hello
World
+": "Hello
World",
+ "+Hello
World
Again
+": "Hello
World
Again",
}
for k, v := range cases {
p := clientio.NewRESPParser(bytes.NewBuffer([]byte(k)))
@@ -58,7 +48,8 @@ func TestSimpleStringDecode(t *testing.T) {
func TestError(t *testing.T) {
cases := map[string]string{
- "-Error message\r\n": "Error message",
+ "-Error message
+": "Error message",
}
for k, v := range cases {
p := clientio.NewRESPParser(bytes.NewBuffer([]byte(k)))
@@ -75,8 +66,10 @@ func TestError(t *testing.T) {
func TestInt64(t *testing.T) {
cases := map[string]int64{
- ":0\r\n": 0,
- ":1000\r\n": 1000,
+ ":0
+": 0,
+ ":1000
+": 1000,
}
for k, v := range cases {
p := clientio.NewRESPParser(bytes.NewBuffer([]byte(k)))
@@ -93,8 +86,12 @@ func TestInt64(t *testing.T) {
func TestBulkStringDecode(t *testing.T) {
cases := map[string]string{
- "$5\r\nhello\r\n": "hello",
- "$0\r\n\r\n": utils.EmptyStr,
+ "$5
+hello
+": "hello",
+ "$0
+
+": utils.EmptyStr,
}
for k, v := range cases {
p := clientio.NewRESPParser(bytes.NewBuffer([]byte(k)))
@@ -111,11 +108,36 @@ func TestBulkStringDecode(t *testing.T) {
func TestArrayDecode(t *testing.T) {
cases := map[string][]interface{}{
- "*0\r\n": {},
- "*2\r\n$5\r\nhello\r\n$5\r\nworld\r\n": {"hello", "world"},
- "*3\r\n:1\r\n:2\r\n:3\r\n": {int64(1), int64(2), int64(3)},
- "*5\r\n:1\r\n:2\r\n:3\r\n:4\r\n$5\r\nhello\r\n": {int64(1), int64(2), int64(3), int64(4), "hello"},
- "*2\r\n*3\r\n:1\r\n:2\r\n:3\r\n*2\r\n+Hello\r\n-World\r\n": {[]int64{int64(1), int64(2), int64(3)}, []interface{}{"Hello", "World"}},
+ "*0
+": {},
+ "*2
+$5
+hello
+$5
+world
+": {"hello", "world"},
+ "*3
+:1
+:2
+:3
+": {int64(1), int64(2), int64(3)},
+ "*5
+:1
+:2
+:3
+:4
+$5
+hello
+": {int64(1), int64(2), int64(3), int64(4), "hello"},
+ "*2
+*3
+:1
+:2
+:3
+*2
++Hello
+-World
+": {[]int64{int64(1), int64(2), int64(3)}, []interface{}{"Hello", "World"}},
}
for k, v := range cases {
p := clientio.NewRESPParser(bytes.NewBuffer([]byte(k)))
@@ -212,11 +234,13 @@ func TestBoolean(t *testing.T) {
}{
{
input: true,
- output: []byte("+true\r\n"),
+ output: []byte("+true
+"),
},
{
input: false,
- output: []byte("+false\r\n"),
+ output: []byte("+false
+"),
},
}
@@ -233,11 +257,13 @@ func TestInteger(t *testing.T) {
}{
{
input: 10,
- output: []byte(":10\r\n"),
+ output: []byte(":10
+"),
},
{
input: -19,
- output: []byte(":-19\r\n"),
+ output: []byte(":-19
+"),
},
}
diff --git a/internal/cmd/cmds.go b/internal/cmd/cmds.go
index 318763941..d8787a489 100644
--- a/internal/cmd/cmds.go
+++ b/internal/cmd/cmds.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package cmd
diff --git a/internal/comm/client.go b/internal/comm/client.go
index 65c05dfd8..b27c516a2 100644
--- a/internal/comm/client.go
+++ b/internal/comm/client.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package comm
diff --git a/internal/commandhandler/cmd_compose.go b/internal/commandhandler/cmd_compose.go
index 93a590e04..054c2dd3d 100644
--- a/internal/commandhandler/cmd_compose.go
+++ b/internal/commandhandler/cmd_compose.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package commandhandler
diff --git a/internal/commandhandler/cmd_custom.go b/internal/commandhandler/cmd_custom.go
index 08051c01f..53ac07505 100644
--- a/internal/commandhandler/cmd_custom.go
+++ b/internal/commandhandler/cmd_custom.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package commandhandler
diff --git a/internal/commandhandler/cmd_decompose.go b/internal/commandhandler/cmd_decompose.go
index 7687e1059..639bc9258 100644
--- a/internal/commandhandler/cmd_decompose.go
+++ b/internal/commandhandler/cmd_decompose.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package commandhandler
diff --git a/internal/commandhandler/cmd_meta.go b/internal/commandhandler/cmd_meta.go
index cae1bb6b7..1d50604f4 100644
--- a/internal/commandhandler/cmd_meta.go
+++ b/internal/commandhandler/cmd_meta.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package commandhandler
diff --git a/internal/commandhandler/cmd_preprocess.go b/internal/commandhandler/cmd_preprocess.go
index 263a4f55c..7c704cdd1 100644
--- a/internal/commandhandler/cmd_preprocess.go
+++ b/internal/commandhandler/cmd_preprocess.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package commandhandler
diff --git a/internal/commandhandler/commandhandler.go b/internal/commandhandler/commandhandler.go
index 53e06f823..569c9b8a1 100644
--- a/internal/commandhandler/commandhandler.go
+++ b/internal/commandhandler/commandhandler.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
+
package commandhandler
import (
diff --git a/internal/commandhandler/registry.go b/internal/commandhandler/registry.go
index 6846a2ad6..318e03edf 100644
--- a/internal/commandhandler/registry.go
+++ b/internal/commandhandler/registry.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
+
package commandhandler
import (
diff --git a/internal/common/map.go b/internal/common/map.go
index f9d9a95a4..2bbdcc347 100644
--- a/internal/common/map.go
+++ b/internal/common/map.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package common
diff --git a/internal/common/regmap.go b/internal/common/regmap.go
index a3afbef70..97c402c71 100644
--- a/internal/common/regmap.go
+++ b/internal/common/regmap.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package common
diff --git a/internal/common/swisstable.go b/internal/common/swisstable.go
index 041e6f41f..68b342cb7 100644
--- a/internal/common/swisstable.go
+++ b/internal/common/swisstable.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package common
diff --git a/internal/dencoding/dencoding_benchmark_test.go b/internal/dencoding/dencoding_benchmark_test.go
index df178e8ae..919300e40 100644
--- a/internal/dencoding/dencoding_benchmark_test.go
+++ b/internal/dencoding/dencoding_benchmark_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package dencoding_test
diff --git a/internal/dencoding/int.go b/internal/dencoding/int.go
index abb4078f0..90169693c 100644
--- a/internal/dencoding/int.go
+++ b/internal/dencoding/int.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package dencoding
diff --git a/internal/dencoding/int_test.go b/internal/dencoding/int_test.go
index 651b3c0d4..6f5b27234 100644
--- a/internal/dencoding/int_test.go
+++ b/internal/dencoding/int_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package dencoding_test
diff --git a/internal/errors/errors.go b/internal/errors/errors.go
index 04d7b1e3c..a3eb9218c 100644
--- a/internal/errors/errors.go
+++ b/internal/errors/errors.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package errors
@@ -59,7 +46,8 @@ func newDiceErr(message string) *DiceError {
}
func (d *DiceError) toEncodedMessage() []byte {
- return []byte(fmt.Sprintf("%s\r\n", d.message.Error()))
+ return []byte(fmt.Sprintf("%s
+", d.message.Error()))
}
func NewErr(message string) error {
@@ -68,7 +56,8 @@ func NewErr(message string) error {
// NewErrWithMessage If the error code is already passed in the string,
// the error code provided is used, otherwise the string "-ERR " for the generic
-// error code is automatically added. Note that 's' must NOT end with \r\n.
+// error code is automatically added. Note that 's' must NOT end with
+.
func NewErrWithMessage(errMsg string) []byte {
// If the string already starts with "-..." then the error code
// is provided by the caller. Otherwise, we use "-ERR".
diff --git a/internal/errors/migrated_errors.go b/internal/errors/migrated_errors.go
index d456e1456..df4ffa5f7 100644
--- a/internal/errors/migrated_errors.go
+++ b/internal/errors/migrated_errors.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package errors
diff --git a/internal/eval/bitpos.go b/internal/eval/bitpos.go
index b3f3c6510..acc70da78 100644
--- a/internal/eval/bitpos.go
+++ b/internal/eval/bitpos.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package eval
diff --git a/internal/eval/bloom_test.go b/internal/eval/bloom_test.go
index 9723d1c3e..83dd995f9 100644
--- a/internal/eval/bloom_test.go
+++ b/internal/eval/bloom_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package eval
diff --git a/internal/eval/bloom_utils.go b/internal/eval/bloom_utils.go
index b53499fed..1a2a4bb22 100644
--- a/internal/eval/bloom_utils.go
+++ b/internal/eval/bloom_utils.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package eval
diff --git a/internal/eval/bytearray.go b/internal/eval/bytearray.go
index b8923e864..4e379cd01 100644
--- a/internal/eval/bytearray.go
+++ b/internal/eval/bytearray.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package eval
diff --git a/internal/eval/bytearray_test.go b/internal/eval/bytearray_test.go
index b70946c8f..2a2cf33d4 100644
--- a/internal/eval/bytearray_test.go
+++ b/internal/eval/bytearray_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package eval
diff --git a/internal/eval/bytelist.go b/internal/eval/bytelist.go
index 5c88933d0..0f9679329 100644
--- a/internal/eval/bytelist.go
+++ b/internal/eval/bytelist.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package eval
diff --git a/internal/eval/bytelist_test.go b/internal/eval/bytelist_test.go
index e8f5c0408..38efa3cc0 100644
--- a/internal/eval/bytelist_test.go
+++ b/internal/eval/bytelist_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package eval
diff --git a/internal/eval/commands.go b/internal/eval/commands.go
index d3238bdd0..e104f5064 100644
--- a/internal/eval/commands.go
+++ b/internal/eval/commands.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package eval
diff --git a/internal/eval/constants.go b/internal/eval/constants.go
index 5c9b1ab3c..021aedad6 100644
--- a/internal/eval/constants.go
+++ b/internal/eval/constants.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package eval
diff --git a/internal/eval/countminsketch.go b/internal/eval/countminsketch.go
index 433d006cb..f971a983c 100644
--- a/internal/eval/countminsketch.go
+++ b/internal/eval/countminsketch.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package eval
diff --git a/internal/eval/countminsketch_test.go b/internal/eval/countminsketch_test.go
index 6f449020f..0b1081f39 100644
--- a/internal/eval/countminsketch_test.go
+++ b/internal/eval/countminsketch_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package eval
diff --git a/internal/eval/deque.go b/internal/eval/deque.go
index 27ef1115c..dcb9db1b3 100644
--- a/internal/eval/deque.go
+++ b/internal/eval/deque.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package eval
diff --git a/internal/eval/deque_test.go b/internal/eval/deque_test.go
index 91472cc5f..db76240e8 100644
--- a/internal/eval/deque_test.go
+++ b/internal/eval/deque_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package eval_test
@@ -36,7 +23,7 @@ func deqTestInit() {
fmt.Printf("rand seed: %v", randSeed)
}
-var deqRunes = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_!@#$%^&*()-=+[]\\;':,.<>/?~.|")
+var deqRunes = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_!@#$%^&*()-=+[]\;':,.<>/?~.|")
func deqRandStr(n int) string {
b := make([]rune, n)
diff --git a/internal/eval/dump_restore.go b/internal/eval/dump_restore.go
index cbdf118a2..cfb0144cd 100644
--- a/internal/eval/dump_restore.go
+++ b/internal/eval/dump_restore.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package eval
diff --git a/internal/eval/eval.go b/internal/eval/eval.go
index d794cb24f..5a77cee0f 100644
--- a/internal/eval/eval.go
+++ b/internal/eval/eval.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package eval
diff --git a/internal/eval/eval_test.go b/internal/eval/eval_test.go
index 646a87d10..5d3d8a622 100644
--- a/internal/eval/eval_test.go
+++ b/internal/eval/eval_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package eval
@@ -169,10 +156,15 @@ func TestEval(t *testing.T) {
func testEvalPING(t *testing.T, store *dstore.Store) {
tests := map[string]evalTestCase{
- "nil value": {input: nil, output: []byte("+PONG\r\n")},
- "empty args": {input: []string{}, output: []byte("+PONG\r\n")},
- "one value": {input: []string{"HEY"}, output: []byte("$3\r\nHEY\r\n")},
- "more than one values": {input: []string{"HEY", "HELLO"}, output: []byte("-ERR wrong number of arguments for 'ping' command\r\n")},
+ "nil value": {input: nil, output: []byte("+PONG
+")},
+ "empty args": {input: []string{}, output: []byte("+PONG
+")},
+ "one value": {input: []string{"HEY"}, output: []byte("$3
+HEY
+")},
+ "more than one values": {input: []string{"HEY", "HELLO"}, output: []byte("-ERR wrong number of arguments for 'ping' command
+")},
}
runEvalTests(t, tests, evalPING, store)
@@ -180,10 +172,15 @@ func testEvalPING(t *testing.T, store *dstore.Store) {
func testEvalECHO(t *testing.T, store *dstore.Store) {
tests := map[string]evalTestCase{
- "nil value": {input: nil, output: []byte("-ERR wrong number of arguments for 'echo' command\r\n")},
- "empty args": {input: []string{}, output: []byte("-ERR wrong number of arguments for 'echo' command\r\n")},
- "one value": {input: []string{"HEY"}, output: []byte("$3\r\nHEY\r\n")},
- "more than one values": {input: []string{"HEY", "HELLO"}, output: []byte("-ERR wrong number of arguments for 'echo' command\r\n")},
+ "nil value": {input: nil, output: []byte("-ERR wrong number of arguments for 'echo' command
+")},
+ "empty args": {input: []string{}, output: []byte("-ERR wrong number of arguments for 'echo' command
+")},
+ "one value": {input: []string{"HEY"}, output: []byte("$3
+HEY
+")},
+ "more than one values": {input: []string{"HEY", "HELLO"}, output: []byte("-ERR wrong number of arguments for 'echo' command
+")},
}
runEvalTests(t, tests, evalECHO, store)
@@ -204,7 +201,8 @@ func testEvalHELLO(t *testing.T, store *dstore.Store) {
"nil value": {input: nil, output: clientio.Encode(resp, false)},
"empty args": {input: []string{}, output: clientio.Encode(resp, false)},
"one value": {input: []string{"HEY"}, output: clientio.Encode(resp, false)},
- "more than one values": {input: []string{"HEY", "HELLO"}, output: []byte("-ERR wrong number of arguments for 'hello' command\r\n")},
+ "more than one values": {input: []string{"HEY", "HELLO"}, output: []byte("-ERR wrong number of arguments for 'hello' command
+")},
}
runEvalTests(t, tests, evalHELLO, store)
@@ -1284,7 +1282,8 @@ func testEvalJSONARRLEN(t *testing.T, store *dstore.Store) {
"nil value": {
setup: func() {},
input: nil,
- output: []byte("-ERR wrong number of arguments for 'json.arrlen' command\r\n"),
+ output: []byte("-ERR wrong number of arguments for 'json.arrlen' command
+"),
migratedOutput: EvalResponse{
Result: nil,
Error: diceerrors.ErrWrongArgumentCount("JSON.ARRLEN"),
@@ -1293,7 +1292,8 @@ func testEvalJSONARRLEN(t *testing.T, store *dstore.Store) {
"key does not exist": {
setup: func() {},
input: []string{"NONEXISTENT_KEY"},
- output: []byte("$-1\r\n"),
+ output: []byte("$-1
+"),
migratedOutput: EvalResponse{
Result: clientio.NIL,
Error: nil,
@@ -1309,7 +1309,8 @@ func testEvalJSONARRLEN(t *testing.T, store *dstore.Store) {
store.Put(key, obj)
},
input: []string{"EXISTING_KEY"},
- output: []byte("-ERR Path '$' does not exist or not an array\r\n"),
+ output: []byte("-ERR Path '$' does not exist or not an array
+"),
migratedOutput: EvalResponse{
Result: nil,
Error: diceerrors.ErrWrongTypeOperation,
@@ -1325,7 +1326,8 @@ func testEvalJSONARRLEN(t *testing.T, store *dstore.Store) {
store.Put(key, obj)
},
input: []string{"EXISTING_KEY"},
- output: []byte(":3\r\n"),
+ output: []byte(":3
+"),
migratedOutput: EvalResponse{
Result: 3,
Error: nil,
@@ -1342,7 +1344,13 @@ func testEvalJSONARRLEN(t *testing.T, store *dstore.Store) {
},
input: []string{"EXISTING_KEY", "$.*"},
- output: []byte("*5\r\n$-1\r\n$-1\r\n$-1\r\n$-1\r\n$-1\r\n"),
+ output: []byte("*5
+$-1
+$-1
+$-1
+$-1
+$-1
+"),
migratedOutput: EvalResponse{
Result: []interface{}{clientio.NIL, clientio.NIL, clientio.NIL, clientio.NIL, clientio.NIL},
Error: nil,
@@ -1360,7 +1368,8 @@ func testEvalJSONARRLEN(t *testing.T, store *dstore.Store) {
},
input: []string{"EXISTING_KEY", "$.language"},
- output: []byte(":2\r\n"),
+ output: []byte(":2
+"),
migratedOutput: EvalResponse{
Result: 2,
Error: nil,
@@ -2329,7 +2338,9 @@ func testEvalJSONARRAPPEND(t *testing.T, store *dstore.Store) {
store.Put(key, obj)
},
input: []string{"array", "$.a", "6"},
- output: []byte("*1\r\n$-1\r\n"),
+ output: []byte("*1
+$-1
+"),
migratedOutput: EvalResponse{
Result: nil,
Error: diceerrors.ErrJSONPathNotFound("$.a"),
@@ -2345,7 +2356,9 @@ func testEvalJSONARRAPPEND(t *testing.T, store *dstore.Store) {
store.Put(key, obj)
},
input: []string{"array", "$.a", "6"},
- output: []byte("*1\r\n:3\r\n"),
+ output: []byte("*1
+:3
+"),
migratedOutput: EvalResponse{
Result: []int64{3},
Error: nil,
@@ -2361,7 +2374,9 @@ func testEvalJSONARRAPPEND(t *testing.T, store *dstore.Store) {
store.Put(key, obj)
},
input: []string{"array", "$.a", "6", "7", "8"},
- output: []byte("*1\r\n:5\r\n"),
+ output: []byte("*1
+:5
+"),
migratedOutput: EvalResponse{
Result: []int64{5},
Error: nil,
@@ -2377,7 +2392,9 @@ func testEvalJSONARRAPPEND(t *testing.T, store *dstore.Store) {
store.Put(key, obj)
},
input: []string{"array", "$.b", `"d"`},
- output: []byte("*1\r\n:3\r\n"),
+ output: []byte("*1
+:3
+"),
migratedOutput: EvalResponse{
Result: []int64{3},
Error: nil,
@@ -2393,7 +2410,9 @@ func testEvalJSONARRAPPEND(t *testing.T, store *dstore.Store) {
store.Put(key, obj)
},
input: []string{"array", "$.a", "[1,2,3]"},
- output: []byte("*1\r\n:2\r\n"),
+ output: []byte("*1
+:2
+"),
migratedOutput: EvalResponse{
Result: []int64{2},
Error: nil,
@@ -2409,7 +2428,9 @@ func testEvalJSONARRAPPEND(t *testing.T, store *dstore.Store) {
store.Put(key, obj)
},
input: []string{"array", "$.a", "{\"c\": 3}"},
- output: []byte("*1\r\n:2\r\n"),
+ output: []byte("*1
+:2
+"),
migratedOutput: EvalResponse{
Result: []int64{2},
Error: nil,
@@ -2425,7 +2446,10 @@ func testEvalJSONARRAPPEND(t *testing.T, store *dstore.Store) {
store.Put(key, obj)
},
input: []string{"array", "$..a", "6"},
- output: []byte("*2\r\n:2\r\n:3\r\n"),
+ output: []byte("*2
+:2
+:3
+"),
migratedOutput: EvalResponse{
Result: []int64{2, 3},
Error: nil,
@@ -2441,7 +2465,9 @@ func testEvalJSONARRAPPEND(t *testing.T, store *dstore.Store) {
store.Put(key, obj)
},
input: []string{"array", "$", "6"},
- output: []byte("*1\r\n:4\r\n"),
+ output: []byte("*1
+:4
+"),
migratedOutput: EvalResponse{
Result: []int64{4},
Error: nil,
@@ -2457,7 +2483,9 @@ func testEvalJSONARRAPPEND(t *testing.T, store *dstore.Store) {
store.Put(key, obj)
},
input: []string{"array", "$.a", `"blue"`},
- output: []byte("*1\r\n:3\r\n"),
+ output: []byte("*1
+:3
+"),
migratedOutput: EvalResponse{
Result: []int64{3},
Error: nil,
@@ -2526,7 +2554,8 @@ func testEvalJSONTOGGLE(t *testing.T, store *dstore.Store) {
var rootData interface{}
err := sonic.Unmarshal([]byte(value), &rootData)
if err != nil {
- fmt.Printf("Debug: Error unmarshaling JSON: %v\n", err)
+ fmt.Printf("Debug: Error unmarshaling JSON: %v
+", err)
}
obj := store.NewObj(rootData, -1, object.ObjTypeJSON)
store.Put(key, obj)
@@ -2545,7 +2574,8 @@ func testEvalJSONTOGGLE(t *testing.T, store *dstore.Store) {
var rootData interface{}
err := sonic.Unmarshal([]byte(value), &rootData)
if err != nil {
- fmt.Printf("Debug: Error unmarshaling JSON: %v\n", err)
+ fmt.Printf("Debug: Error unmarshaling JSON: %v
+", err)
}
obj := store.NewObj(rootData, -1, object.ObjTypeJSON)
store.Put(key, obj)
@@ -3631,7 +3661,8 @@ func testEvalHEXISTS(t *testing.T, store *dstore.Store) {
if responseBytes, ok := response.Result.([]byte); ok && tt.migratedOutput.Result != nil {
// If has result
if expectedBytes, ok := tt.migratedOutput.Result.([]byte); ok {
- // fmt.Printf("%v | %v\n", responseBytes, expectedBytes)
+ // fmt.Printf("%v | %v
+", responseBytes, expectedBytes)
assert.True(t, bytes.Equal(responseBytes, expectedBytes), "expected and actual byte slices should be equal")
}
} else {
@@ -4701,16 +4732,19 @@ func testEvalHKEYS(t *testing.T, store *dstore.Store) {
response := evalHKEYS(tt.input, store)
- // fmt.Printf("EvalReponse: %v\n", response)
+ // fmt.Printf("EvalReponse: %v
+", response)
// Handle comparison for byte slices
if responseBytes, ok := response.Result.([]byte); ok && tt.migratedOutput.Result != nil {
if expectedBytes, ok := tt.migratedOutput.Result.([]byte); ok {
- // fmt.Printf("G: %v | %v\n", responseBytes, expectedBytes)
+ // fmt.Printf("G: %v | %v
+", responseBytes, expectedBytes)
assert.True(t, bytes.Equal(responseBytes, expectedBytes), "expected and actual byte slices should be equal")
}
} else {
- // fmt.Printf("G1: %v | %v\n", response.Result, tt.migratedOutput.Result)
+ // fmt.Printf("G1: %v | %v
+", response.Result, tt.migratedOutput.Result)
switch e := tt.migratedOutput.Result.(type) {
case []interface{}, []string:
assert.ElementsMatch(t, e, response.Result)
@@ -4720,7 +4754,8 @@ func testEvalHKEYS(t *testing.T, store *dstore.Store) {
}
if tt.migratedOutput.Error != nil {
- // fmt.Printf("E: %v | %v\n", response.Error, tt.migratedOutput.Error.Error())
+ // fmt.Printf("E: %v | %v
+", response.Error, tt.migratedOutput.Error.Error())
assert.EqualError(t, response.Error, tt.migratedOutput.Error.Error())
} else {
assert.NoError(t, response.Error)
@@ -5114,7 +5149,8 @@ func testEvalJSONARRPOP(t *testing.T, store *dstore.Store) {
"wrong number of args passed": {
setup: func() {},
input: nil,
- output: []byte("-ERR wrong number of arguments for 'json.arrpop' command\r\n"),
+ output: []byte("-ERR wrong number of arguments for 'json.arrpop' command
+"),
migratedOutput: EvalResponse{
Result: nil,
Error: diceerrors.ErrWrongArgumentCount("JSON.ARRPOP"),
@@ -5123,7 +5159,8 @@ func testEvalJSONARRPOP(t *testing.T, store *dstore.Store) {
"key does not exist": {
setup: func() {},
input: []string{"NOTEXISTANT_KEY"},
- output: []byte("-ERR could not perform this operation on a key that doesn't exist\r\n"),
+ output: []byte("-ERR could not perform this operation on a key that doesn't exist
+"),
migratedOutput: EvalResponse{
Result: nil,
Error: diceerrors.ErrKeyNotFound,
@@ -5139,7 +5176,8 @@ func testEvalJSONARRPOP(t *testing.T, store *dstore.Store) {
store.Put(key, obj)
},
input: []string{"MOCK_KEY"},
- output: []byte("-ERR Path '$' does not exist or not an array\r\n"),
+ output: []byte("-ERR Path '$' does not exist or not an array
+"),
migratedOutput: EvalResponse{
Result: nil,
Error: diceerrors.ErrWrongTypeOperation,
@@ -5155,7 +5193,9 @@ func testEvalJSONARRPOP(t *testing.T, store *dstore.Store) {
store.Put(key, obj)
},
input: []string{"MOCK_KEY", "$.b"},
- output: []byte("*1\r\n$-1\r\n"),
+ output: []byte("*1
+$-1
+"),
migratedOutput: EvalResponse{
Result: []interface{}{clientio.NIL},
Error: nil,
@@ -5171,7 +5211,10 @@ func testEvalJSONARRPOP(t *testing.T, store *dstore.Store) {
store.Put(key, obj)
},
input: []string{"MOCK_KEY", "$.*"},
- output: []byte("*2\r\n$-1\r\n$-1\r\n"),
+ output: []byte("*2
+$-1
+$-1
+"),
migratedOutput: EvalResponse{
Result: []interface{}{clientio.NIL, clientio.NIL},
Error: nil,
@@ -5187,7 +5230,8 @@ func testEvalJSONARRPOP(t *testing.T, store *dstore.Store) {
store.Put(key, obj)
},
input: []string{"MOCK_KEY"},
- output: []byte(":5\r\n"),
+ output: []byte(":5
+"),
migratedOutput: EvalResponse{
Result: float64(5),
Error: nil,
@@ -5203,7 +5247,8 @@ func testEvalJSONARRPOP(t *testing.T, store *dstore.Store) {
store.Put(key, obj)
},
input: []string{"MOCK_KEY", "$", "2"},
- output: []byte(":2\r\n"),
+ output: []byte(":2
+"),
migratedOutput: EvalResponse{
Result: float64(2),
Error: nil,
@@ -5219,7 +5264,8 @@ func testEvalJSONARRPOP(t *testing.T, store *dstore.Store) {
store.Put(key, obj)
},
input: []string{"MOCK_KEY", "$", "10"},
- output: []byte(":5\r\n"),
+ output: []byte(":5
+"),
migratedOutput: EvalResponse{
Result: float64(5),
Error: nil,
@@ -5235,7 +5281,8 @@ func testEvalJSONARRPOP(t *testing.T, store *dstore.Store) {
store.Put(key, obj)
},
input: []string{"MOCK_KEY", "$", "-2"},
- output: []byte(":4\r\n"),
+ output: []byte(":4
+"),
migratedOutput: EvalResponse{
Result: float64(4),
Error: nil,
@@ -5251,7 +5298,8 @@ func testEvalJSONARRPOP(t *testing.T, store *dstore.Store) {
store.Put(key, obj)
},
input: []string{"MOCK_KEY", "$", "-10"},
- output: []byte(":0\r\n"),
+ output: []byte(":0
+"),
migratedOutput: EvalResponse{
Result: float64(0),
Error: nil,
@@ -5267,7 +5315,8 @@ func testEvalJSONARRPOP(t *testing.T, store *dstore.Store) {
store.Put(key, obj)
},
input: []string{"MOCK_KEY", "$", "2"},
- output: []byte(":0\r\n"),
+ output: []byte(":0
+"),
newValidator: func(output interface{}) {
key := "MOCK_KEY"
obj := store.Get(key)
@@ -5290,7 +5339,9 @@ func testEvalJSONARRPOP(t *testing.T, store *dstore.Store) {
store.Put(key, obj)
},
input: []string{"MOCK_KEY", "$.b", "2"},
- output: []byte("*1\r\n:2\r\n"),
+ output: []byte("*1
+:2
+"),
newValidator: func(output interface{}) {
key := "MOCK_KEY"
path := "$.b"
@@ -5424,7 +5475,9 @@ func testEvalCOMMAND(t *testing.T, store *dstore.Store) {
"command help": {
input: []string{"HELP"},
migratedOutput: EvalResponse{
- Result: []string([]string{"COMMAND [ [value] [opt] ...]. Subcommands are:", "(no subcommand)", " Return details about all DiceDB commands.", "COUNT", " Return the total number of commands in this DiceDB server.", "LIST", " Return a list of all commands in this DiceDB server.", "INFO [ ...]", " Return details about the specified DiceDB commands. If no command names are given, documentation details for all commands are returned.", "DOCS [ ...]", "\tReturn documentation details about multiple diceDB commands.\n\tIf no command names are given, documentation details for all\n\tcommands are returned.", "GETKEYS ", " Return the keys from a full DiceDB command.", "HELP", " Print this help."}),
+ Result: []string([]string{"COMMAND [ [value] [opt] ...]. Subcommands are:", "(no subcommand)", " Return details about all DiceDB commands.", "COUNT", " Return the total number of commands in this DiceDB server.", "LIST", " Return a list of all commands in this DiceDB server.", "INFO [ ...]", " Return details about the specified DiceDB commands. If no command names are given, documentation details for all commands are returned.", "DOCS [ ...]", " Return documentation details about multiple diceDB commands.
+ If no command names are given, documentation details for all
+ commands are returned.", "GETKEYS ", " Return the keys from a full DiceDB command.", "HELP", " Print this help."}),
Error: nil,
},
},
@@ -5529,14 +5582,24 @@ func testEvalCOMMAND(t *testing.T, store *dstore.Store) {
"command docs valid command SET": {
input: []string{"DOCS", "SET"},
migratedOutput: EvalResponse{
- Result: []interface{}([]interface{}{[]interface{}{"set", []interface{}{"summary", "SET puts a new pair in db as in the args\n\t\targs must contain key and value.\n\t\targs can also contain multiple options -\n\t\tEX or ex which will set the expiry time(in secs) for the key\n\t\tReturns encoded error response if at least a pair is not part of args\n\t\tReturns encoded error response if expiry tme value in not integer\n\t\tReturns encoded OK RESP once new entry is added\n\t\tIf the key already exists then the value will be overwritten and expiry will be discarded", "arity", -3, "beginIndex", 1, "lastIndex", 0, "step", 0}}}),
+ Result: []interface{}([]interface{}{[]interface{}{"set", []interface{}{"summary", "SET puts a new pair in db as in the args
+ args must contain key and value.
+ args can also contain multiple options -
+ EX or ex which will set the expiry time(in secs) for the key
+ Returns encoded error response if at least a pair is not part of args
+ Returns encoded error response if expiry tme value in not integer
+ Returns encoded OK RESP once new entry is added
+ If the key already exists then the value will be overwritten and expiry will be discarded", "arity", -3, "beginIndex", 1, "lastIndex", 0, "step", 0}}}),
Error: nil,
},
},
"command docs valid command GET": {
input: []string{"DOCS", "GET"},
migratedOutput: EvalResponse{
- Result: []interface{}([]interface{}{[]interface{}{"get", []interface{}{"summary", "GET returns the value for the queried key in args\n\t\tThe key should be the only param in args\n\t\tThe RESP value of the key is encoded and then returned\n\t\tGET returns RespNIL if key is expired or it does not exist", "arity", 2, "beginIndex", 1, "lastIndex", 0, "step", 0}}}),
+ Result: []interface{}([]interface{}{[]interface{}{"get", []interface{}{"summary", "GET returns the value for the queried key in args
+ The key should be the only param in args
+ The RESP value of the key is encoded and then returned
+ GET returns RespNIL if key is expired or it does not exist", "arity", 2, "beginIndex", 1, "lastIndex", 0, "step", 0}}}),
Error: nil,
},
},
@@ -5550,7 +5613,17 @@ func testEvalCOMMAND(t *testing.T, store *dstore.Store) {
"command docs multiple valid commands": {
input: []string{"DOCS", "SET", "GET"},
migratedOutput: EvalResponse{
- Result: []interface{}([]interface{}{[]interface{}{"set", []interface{}{"summary", "SET puts a new pair in db as in the args\n\t\targs must contain key and value.\n\t\targs can also contain multiple options -\n\t\tEX or ex which will set the expiry time(in secs) for the key\n\t\tReturns encoded error response if at least a pair is not part of args\n\t\tReturns encoded error response if expiry tme value in not integer\n\t\tReturns encoded OK RESP once new entry is added\n\t\tIf the key already exists then the value will be overwritten and expiry will be discarded", "arity", -3, "beginIndex", 1, "lastIndex", 0, "step", 0}}, []interface{}{"get", []interface{}{"summary", "GET returns the value for the queried key in args\n\t\tThe key should be the only param in args\n\t\tThe RESP value of the key is encoded and then returned\n\t\tGET returns RespNIL if key is expired or it does not exist", "arity", 2, "beginIndex", 1, "lastIndex", 0, "step", 0}}}),
+ Result: []interface{}([]interface{}{[]interface{}{"set", []interface{}{"summary", "SET puts a new pair in db as in the args
+ args must contain key and value.
+ args can also contain multiple options -
+ EX or ex which will set the expiry time(in secs) for the key
+ Returns encoded error response if at least a pair is not part of args
+ Returns encoded error response if expiry tme value in not integer
+ Returns encoded OK RESP once new entry is added
+ If the key already exists then the value will be overwritten and expiry will be discarded", "arity", -3, "beginIndex", 1, "lastIndex", 0, "step", 0}}, []interface{}{"get", []interface{}{"summary", "GET returns the value for the queried key in args
+ The key should be the only param in args
+ The RESP value of the key is encoded and then returned
+ GET returns RespNIL if key is expired or it does not exist", "arity", 2, "beginIndex", 1, "lastIndex", 0, "step", 0}}}),
Error: nil,
},
},
@@ -5564,7 +5637,14 @@ func testEvalCOMMAND(t *testing.T, store *dstore.Store) {
"command docs mixture of valid and invalid commands": {
input: []string{"DOCS", "SET", "INVALID_CMD"},
migratedOutput: EvalResponse{
- Result: []interface{}([]interface{}{[]interface{}{"set", []interface{}{"summary", "SET puts a new pair in db as in the args\n\t\targs must contain key and value.\n\t\targs can also contain multiple options -\n\t\tEX or ex which will set the expiry time(in secs) for the key\n\t\tReturns encoded error response if at least a pair is not part of args\n\t\tReturns encoded error response if expiry tme value in not integer\n\t\tReturns encoded OK RESP once new entry is added\n\t\tIf the key already exists then the value will be overwritten and expiry will be discarded", "arity", -3, "beginIndex", 1, "lastIndex", 0, "step", 0}}}),
+ Result: []interface{}([]interface{}{[]interface{}{"set", []interface{}{"summary", "SET puts a new pair in db as in the args
+ args must contain key and value.
+ args can also contain multiple options -
+ EX or ex which will set the expiry time(in secs) for the key
+ Returns encoded error response if at least a pair is not part of args
+ Returns encoded error response if expiry tme value in not integer
+ Returns encoded OK RESP once new entry is added
+ If the key already exists then the value will be overwritten and expiry will be discarded", "arity", -3, "beginIndex", 1, "lastIndex", 0, "step", 0}}}),
Error: nil,
},
},
@@ -7972,7 +8052,8 @@ func testEvalHINCRBYFLOAT(t *testing.T, store *dstore.Store) {
store.Put(key, obj)
},
input: []string{"key", "field", "a"},
- output: []byte("-ERR value is not an integer or a float\r\n"),
+ output: []byte("-ERR value is not an integer or a float
+"),
migratedOutput: EvalResponse{Result: nil, Error: diceerrors.ErrInvalidNumberFormat},
},
"HINCRBYFLOAT on a field with non-numeric value": {
diff --git a/internal/eval/execute.go b/internal/eval/execute.go
index 1a1a284fd..362b188d0 100644
--- a/internal/eval/execute.go
+++ b/internal/eval/execute.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package eval
diff --git a/internal/eval/geo/geo.go b/internal/eval/geo/geo.go
index 07ce26272..cd01944b2 100644
--- a/internal/eval/geo/geo.go
+++ b/internal/eval/geo/geo.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package geo
diff --git a/internal/eval/hmap.go b/internal/eval/hmap.go
index c4276d83d..db27a88df 100644
--- a/internal/eval/hmap.go
+++ b/internal/eval/hmap.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package eval
diff --git a/internal/eval/hmap_test.go b/internal/eval/hmap_test.go
index 060fffd37..2a26ba7b3 100644
--- a/internal/eval/hmap_test.go
+++ b/internal/eval/hmap_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package eval
diff --git a/internal/eval/main_test.go b/internal/eval/main_test.go
index 8e5b63da1..187e5cca9 100644
--- a/internal/eval/main_test.go
+++ b/internal/eval/main_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package eval_test
diff --git a/internal/eval/sortedset/sorted_set.go b/internal/eval/sortedset/sorted_set.go
index 54dc857aa..b34bb739d 100644
--- a/internal/eval/sortedset/sorted_set.go
+++ b/internal/eval/sortedset/sorted_set.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package sortedset
diff --git a/internal/eval/store_eval.go b/internal/eval/store_eval.go
index 7d6f2c6db..90b6a49a2 100644
--- a/internal/eval/store_eval.go
+++ b/internal/eval/store_eval.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package eval
@@ -6825,7 +6812,9 @@ func evalCommandHelp(args []string) *EvalResponse {
infoTitle := "INFO [ ...]"
infoMessage := " Return details about the specified DiceDB commands. If no command names are given, documentation details for all commands are returned."
docsTitle := "DOCS [ ...]"
- docsMessage := "\tReturn documentation details about multiple diceDB commands.\n\tIf no command names are given, documentation details for all\n\tcommands are returned."
+ docsMessage := " Return documentation details about multiple diceDB commands.
+ If no command names are given, documentation details for all
+ commands are returned."
getKeysTitle := "GETKEYS "
getKeysMessage := " Return the keys from a full DiceDB command."
helpTitle := "HELP"
diff --git a/internal/eval/type_asserts.go b/internal/eval/type_asserts.go
index 8dc55f7f8..22bc45a10 100644
--- a/internal/eval/type_asserts.go
+++ b/internal/eval/type_asserts.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package eval
diff --git a/internal/eval/type_bloomfilter.go b/internal/eval/type_bloomfilter.go
index d255d05f1..578f39353 100644
--- a/internal/eval/type_bloomfilter.go
+++ b/internal/eval/type_bloomfilter.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package eval
diff --git a/internal/eval/type_string.go b/internal/eval/type_string.go
index 66a87c4c5..b6cd05c55 100644
--- a/internal/eval/type_string.go
+++ b/internal/eval/type_string.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package eval
diff --git a/internal/eval/type_string_test.go b/internal/eval/type_string_test.go
index 9fb723780..b2aa2c3f7 100644
--- a/internal/eval/type_string_test.go
+++ b/internal/eval/type_string_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package eval
diff --git a/internal/id/id.go b/internal/id/id.go
index 879b4a95b..9f68c9869 100644
--- a/internal/id/id.go
+++ b/internal/id/id.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package id
diff --git a/internal/id/id_test.go b/internal/id/id_test.go
index 11e673a26..e87183cf8 100644
--- a/internal/id/id_test.go
+++ b/internal/id/id_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package id
diff --git a/internal/iomultiplexer/constants.go b/internal/iomultiplexer/constants.go
index 990116c13..2fec62698 100644
--- a/internal/iomultiplexer/constants.go
+++ b/internal/iomultiplexer/constants.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package iomultiplexer
diff --git a/internal/iomultiplexer/epoll_linux.go b/internal/iomultiplexer/epoll_linux.go
index a760d357b..69b2d4c93 100644
--- a/internal/iomultiplexer/epoll_linux.go
+++ b/internal/iomultiplexer/epoll_linux.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package iomultiplexer
diff --git a/internal/iomultiplexer/errors.go b/internal/iomultiplexer/errors.go
index 04e06e45f..2c86476de 100644
--- a/internal/iomultiplexer/errors.go
+++ b/internal/iomultiplexer/errors.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package iomultiplexer
diff --git a/internal/iomultiplexer/interface.go b/internal/iomultiplexer/interface.go
index b69717776..4306bc085 100644
--- a/internal/iomultiplexer/interface.go
+++ b/internal/iomultiplexer/interface.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package iomultiplexer
diff --git a/internal/iomultiplexer/kqueue_darwin.go b/internal/iomultiplexer/kqueue_darwin.go
index 3373c6d89..de357f2b1 100644
--- a/internal/iomultiplexer/kqueue_darwin.go
+++ b/internal/iomultiplexer/kqueue_darwin.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package iomultiplexer
diff --git a/internal/iomultiplexer/types.go b/internal/iomultiplexer/types.go
index 1bc820136..744344162 100644
--- a/internal/iomultiplexer/types.go
+++ b/internal/iomultiplexer/types.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package iomultiplexer
diff --git a/internal/iomultiplexer/types_darwin.go b/internal/iomultiplexer/types_darwin.go
index dc839cfa9..0139a164d 100644
--- a/internal/iomultiplexer/types_darwin.go
+++ b/internal/iomultiplexer/types_darwin.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package iomultiplexer
diff --git a/internal/iomultiplexer/types_linux.go b/internal/iomultiplexer/types_linux.go
index 7821dff73..483d4d51d 100644
--- a/internal/iomultiplexer/types_linux.go
+++ b/internal/iomultiplexer/types_linux.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package iomultiplexer
diff --git a/internal/iothread/iothread.go b/internal/iothread/iothread.go
index d7c108235..cc44d614d 100644
--- a/internal/iothread/iothread.go
+++ b/internal/iothread/iothread.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package iothread
diff --git a/internal/iothread/manager.go b/internal/iothread/manager.go
index 0fb752759..3bbf19cbb 100644
--- a/internal/iothread/manager.go
+++ b/internal/iothread/manager.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package iothread
diff --git a/internal/logger/logger.go b/internal/logger/logger.go
index 08e24941a..14c11fab9 100644
--- a/internal/logger/logger.go
+++ b/internal/logger/logger.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package logger
diff --git a/internal/logger/zerolog.go b/internal/logger/zerolog.go
index 21d6e7f55..1946fc247 100644
--- a/internal/logger/zerolog.go
+++ b/internal/logger/zerolog.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package logger
diff --git a/internal/object/deep_copy.go b/internal/object/deep_copy.go
index 6dcdec74a..182e9dfb9 100644
--- a/internal/object/deep_copy.go
+++ b/internal/object/deep_copy.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package object
diff --git a/internal/object/object.go b/internal/object/object.go
index 67118ccda..395410181 100644
--- a/internal/object/object.go
+++ b/internal/object/object.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package object
diff --git a/internal/object/typeencoding.go b/internal/object/typeencoding.go
index 4a75e3ceb..9b6bda107 100644
--- a/internal/object/typeencoding.go
+++ b/internal/object/typeencoding.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package object
diff --git a/internal/observability/constants.go b/internal/observability/constants.go
index d4860f109..610d30321 100644
--- a/internal/observability/constants.go
+++ b/internal/observability/constants.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package observability
diff --git a/internal/observability/hardware.go b/internal/observability/hardware.go
index 406991f17..075fe5dd9 100644
--- a/internal/observability/hardware.go
+++ b/internal/observability/hardware.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package observability
diff --git a/internal/observability/instance.go b/internal/observability/instance.go
index 6c83a3649..bcd611100 100644
--- a/internal/observability/instance.go
+++ b/internal/observability/instance.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package observability
diff --git a/internal/observability/ping.go b/internal/observability/ping.go
index 84830909d..742da841a 100644
--- a/internal/observability/ping.go
+++ b/internal/observability/ping.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package observability
diff --git a/internal/ops/store_op.go b/internal/ops/store_op.go
index 236f63fea..5aa4b4634 100644
--- a/internal/ops/store_op.go
+++ b/internal/ops/store_op.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package ops
diff --git a/internal/querymanager/watch_response.go b/internal/querymanager/watch_response.go
index 13ad8fde4..e3db0e4da 100644
--- a/internal/querymanager/watch_response.go
+++ b/internal/querymanager/watch_response.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package querymanager
diff --git a/internal/regex/regex.go b/internal/regex/regex.go
index 5f24e7179..4452c3b51 100644
--- a/internal/regex/regex.go
+++ b/internal/regex/regex.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package regex
diff --git a/internal/regex/regex_test.go b/internal/regex/regex_test.go
index 5bd6075cf..831c2da46 100644
--- a/internal/regex/regex_test.go
+++ b/internal/regex/regex_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package regex
diff --git a/internal/server/abstractserver/abstract_server.go b/internal/server/abstractserver/abstract_server.go
index 678462737..abd84d868 100644
--- a/internal/server/abstractserver/abstract_server.go
+++ b/internal/server/abstractserver/abstract_server.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package abstractserver
diff --git a/internal/server/httpws/httpResp.go b/internal/server/httpws/httpResp.go
index eda3bf275..45a5e7ffa 100644
--- a/internal/server/httpws/httpResp.go
+++ b/internal/server/httpws/httpResp.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package httpws
diff --git a/internal/server/httpws/httpServer.go b/internal/server/httpws/httpServer.go
index 218bf0266..4110f2d1b 100644
--- a/internal/server/httpws/httpServer.go
+++ b/internal/server/httpws/httpServer.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package httpws
diff --git a/internal/server/httpws/redisCmdAdapter.go b/internal/server/httpws/redisCmdAdapter.go
index 87286679e..1a03d9259 100644
--- a/internal/server/httpws/redisCmdAdapter.go
+++ b/internal/server/httpws/redisCmdAdapter.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package httpws
diff --git a/internal/server/httpws/redisCmdAdapter_test.go b/internal/server/httpws/redisCmdAdapter_test.go
index 23207c468..b4bc33665 100644
--- a/internal/server/httpws/redisCmdAdapter_test.go
+++ b/internal/server/httpws/redisCmdAdapter_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package httpws
diff --git a/internal/server/httpws/websocketServer.go b/internal/server/httpws/websocketServer.go
index f1fb8b142..1f62716fe 100644
--- a/internal/server/httpws/websocketServer.go
+++ b/internal/server/httpws/websocketServer.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package httpws
diff --git a/internal/server/resp/server.go b/internal/server/resp/server.go
index 74b726a24..378035b11 100644
--- a/internal/server/resp/server.go
+++ b/internal/server/resp/server.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package resp
diff --git a/internal/server/utils/array.go b/internal/server/utils/array.go
index 3126ba6ab..7e30ed624 100644
--- a/internal/server/utils/array.go
+++ b/internal/server/utils/array.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package utils
diff --git a/internal/server/utils/bitfield.go b/internal/server/utils/bitfield.go
index cc91ddf06..0844f1e26 100644
--- a/internal/server/utils/bitfield.go
+++ b/internal/server/utils/bitfield.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package utils
diff --git a/internal/server/utils/boolToInt.go b/internal/server/utils/boolToInt.go
index addf94bd9..2dc72f3b1 100644
--- a/internal/server/utils/boolToInt.go
+++ b/internal/server/utils/boolToInt.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package utils
diff --git a/internal/server/utils/constants.go b/internal/server/utils/constants.go
index 5a1f90903..61d070f4e 100644
--- a/internal/server/utils/constants.go
+++ b/internal/server/utils/constants.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package utils
diff --git a/internal/server/utils/floatToInt.go b/internal/server/utils/floatToInt.go
index 17bc306c2..0f3290c46 100644
--- a/internal/server/utils/floatToInt.go
+++ b/internal/server/utils/floatToInt.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package utils
diff --git a/internal/server/utils/json.go b/internal/server/utils/json.go
index 539a9b1b1..9e0a961d8 100644
--- a/internal/server/utils/json.go
+++ b/internal/server/utils/json.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package utils
diff --git a/internal/server/utils/jsontype.go b/internal/server/utils/jsontype.go
index bb6026d8c..eba761b80 100644
--- a/internal/server/utils/jsontype.go
+++ b/internal/server/utils/jsontype.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package utils
diff --git a/internal/server/utils/jsontype_test.go b/internal/server/utils/jsontype_test.go
index 1a305f91c..b8d48b99c 100644
--- a/internal/server/utils/jsontype_test.go
+++ b/internal/server/utils/jsontype_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package utils
diff --git a/internal/server/utils/round.go b/internal/server/utils/round.go
index 95806924d..6cd3a0a3e 100644
--- a/internal/server/utils/round.go
+++ b/internal/server/utils/round.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package utils
diff --git a/internal/server/utils/time.go b/internal/server/utils/time.go
index 7ed4a83dd..4cf15810e 100644
--- a/internal/server/utils/time.go
+++ b/internal/server/utils/time.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package utils
diff --git a/internal/shard/shard_manager.go b/internal/shard/shard_manager.go
index 4ff603817..b2201959e 100644
--- a/internal/shard/shard_manager.go
+++ b/internal/shard/shard_manager.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package shard
diff --git a/internal/shard/shard_thread.go b/internal/shard/shard_thread.go
index b7c93d14f..b8be42062 100644
--- a/internal/shard/shard_thread.go
+++ b/internal/shard/shard_thread.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package shard
diff --git a/internal/store/aof.go b/internal/store/aof.go
index 681dcb6f2..24e0db0d8 100644
--- a/internal/store/aof.go
+++ b/internal/store/aof.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package store
@@ -59,7 +46,8 @@ func (a *AOF) Write(operation string) error {
a.mutex.Lock()
defer a.mutex.Unlock()
- if _, err := a.writer.WriteString(operation + "\n"); err != nil {
+ if _, err := a.writer.WriteString(operation + "
+"); err != nil {
return err
}
if err := a.writer.Flush(); err != nil {
@@ -99,7 +87,9 @@ func (a *AOF) Load() ([]string, error) {
}
func encodeString(v string) []byte {
- return []byte(fmt.Sprintf("$%d\r\n%s\r\n", len(v), v))
+ return []byte(fmt.Sprintf("$%d
+%s
+", len(v), v))
}
func encode(strs []string) []byte {
@@ -108,7 +98,8 @@ func encode(strs []string) []byte {
for _, b := range strs {
buf.Write(encodeString(b))
}
- return []byte(fmt.Sprintf("*%d\r\n%s", len(strs), buf.Bytes()))
+ return []byte(fmt.Sprintf("*%d
+%s", len(strs), buf.Bytes()))
}
// TODO: Support Expiration
diff --git a/internal/store/aof_test.go b/internal/store/aof_test.go
index 92880eb38..39a6561f2 100644
--- a/internal/store/aof_test.go
+++ b/internal/store/aof_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package store
diff --git a/internal/store/batchevictionlru.go b/internal/store/batchevictionlru.go
index 4cfecda45..339379053 100644
--- a/internal/store/batchevictionlru.go
+++ b/internal/store/batchevictionlru.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package store
diff --git a/internal/store/batchevictionlru_test.go b/internal/store/batchevictionlru_test.go
index 37f1a7bb8..9276f2554 100644
--- a/internal/store/batchevictionlru_test.go
+++ b/internal/store/batchevictionlru_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package store
diff --git a/internal/store/constants.go b/internal/store/constants.go
index 1c2e8d95a..a7d3e0b22 100644
--- a/internal/store/constants.go
+++ b/internal/store/constants.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package store
diff --git a/internal/store/eviction.go b/internal/store/eviction.go
index a6d56cb27..d4cd78847 100644
--- a/internal/store/eviction.go
+++ b/internal/store/eviction.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package store
diff --git a/internal/store/expire.go b/internal/store/expire.go
index 077591237..0c1b7a3f2 100644
--- a/internal/store/expire.go
+++ b/internal/store/expire.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package store
diff --git a/internal/store/expire_test.go b/internal/store/expire_test.go
index 15cc00789..59f3bfb37 100644
--- a/internal/store/expire_test.go
+++ b/internal/store/expire_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package store
diff --git a/internal/store/store.go b/internal/store/store.go
index d38e4d511..224a897a1 100644
--- a/internal/store/store.go
+++ b/internal/store/store.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package store
diff --git a/internal/store/store_options.go b/internal/store/store_options.go
index 3176ea3ce..ba127bfec 100644
--- a/internal/store/store_options.go
+++ b/internal/store/store_options.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package store
diff --git a/internal/wal/wal.go b/internal/wal/wal.go
index a80d3db3c..de75e11b9 100644
--- a/internal/wal/wal.go
+++ b/internal/wal/wal.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package wal
diff --git a/internal/wal/wal.pb.go b/internal/wal/wal.pb.go
index 36ac95d9f..ee3ca70c7 100644
--- a/internal/wal/wal.pb.go
+++ b/internal/wal/wal.pb.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
diff --git a/internal/wal/wal.proto b/internal/wal/wal.proto
index d502f328b..9184fe008 100644
--- a/internal/wal/wal.proto
+++ b/internal/wal/wal.proto
@@ -1,19 +1,3 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-
syntax = "proto3";
package wal;
diff --git a/internal/wal/wal_aof.go b/internal/wal/wal_aof.go
index 4a561de58..0a8430692 100644
--- a/internal/wal/wal_aof.go
+++ b/internal/wal/wal_aof.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package wal
@@ -164,7 +151,7 @@ func (wal *AOF) writeEntry(data []byte) error {
}
// if wal-mode unbuffered immediately sync to disk
- if wal.walMode == WALModeUnbuffered { //nolint:goconst
+ if wal.walMode == WALModeUnbuffered {
if err := wal.Sync(); err != nil {
return err
}
@@ -255,7 +242,7 @@ func (wal *AOF) Sync() error {
if err := wal.bufWriter.Flush(); err != nil {
return err
}
- if wal.writeMode == "fsync" { //nolint:goconst
+ if wal.writeMode == "fsync" {
if err := wal.currentSegmentFile.Sync(); err != nil {
return err
}
diff --git a/internal/wal/wal_null.go b/internal/wal/wal_null.go
index f50f87efa..31d917217 100644
--- a/internal/wal/wal_null.go
+++ b/internal/wal/wal_null.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package wal
diff --git a/internal/wal/wal_sqlite.go b/internal/wal/wal_sqlite.go
index 677019bd1..cc7199b3a 100644
--- a/internal/wal/wal_sqlite.go
+++ b/internal/wal/wal_sqlite.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package wal
diff --git a/internal/wal/wal_test.go b/internal/wal/wal_test.go
index 00a3a9506..9669455b2 100644
--- a/internal/wal/wal_test.go
+++ b/internal/wal/wal_test.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package wal_test
diff --git a/internal/wal/wal_utils.go b/internal/wal/wal_utils.go
index 790f8b7c1..c4649cde0 100644
--- a/internal/wal/wal_utils.go
+++ b/internal/wal/wal_utils.go
@@ -1,3 +1,6 @@
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
+
package wal
import (
diff --git a/internal/watchmanager/watch_manager.go b/internal/watchmanager/watch_manager.go
index 99eda75c9..ee8a9a7e3 100644
--- a/internal/watchmanager/watch_manager.go
+++ b/internal/watchmanager/watch_manager.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package watchmanager
diff --git a/main.go b/main.go
index 01ea98558..629861eaa 100644
--- a/main.go
+++ b/main.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package main
diff --git a/mocks/slog_noop.go b/mocks/slog_noop.go
index 5866fe5de..da72c6d85 100644
--- a/mocks/slog_noop.go
+++ b/mocks/slog_noop.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package mocks
diff --git a/testutils/json.go b/testutils/json.go
index 89fe75d88..d98700f12 100644
--- a/testutils/json.go
+++ b/testutils/json.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package testutils
@@ -40,7 +27,9 @@ func AssertJSONEqualList(t *testing.T, expected []string, actual string) {
}
}
if !res {
- t.Errorf("JSON not equal.\nExpected one of: %s\nActual: %s", expected, actual)
+ t.Errorf("JSON not equal.
+Expected one of: %s
+Actual: %s", expected, actual)
}
}
diff --git a/testutils/parsecommand.go b/testutils/parsecommand.go
index 2a6c4c8c4..ad8f3a154 100644
--- a/testutils/parsecommand.go
+++ b/testutils/parsecommand.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package testutils
diff --git a/testutils/slices.go b/testutils/slices.go
index acc9f4e0d..506150060 100644
--- a/testutils/slices.go
+++ b/testutils/slices.go
@@ -1,18 +1,5 @@
-// This file is part of DiceDB.
-// Copyright (C) 2024 DiceDB (dicedb.io).
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
+// Copyright (c) 2022-present, DiceDB contributors
+// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information.
package testutils