File golang-github-magiconair-properties.spec of Package golang-github-magiconair-properties

#
# spec file for package golang-github-magiconair-properties
#
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%global provider        github
%global provider_tld    com
%global project         magiconair
%global repo            properties
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
%global import_path     %{provider_prefix}

Name:           golang-%{provider}-%{project}-%{repo}
Version:        1.8.1+git20190510.de8848e
Release:        0
Summary:        Java properties scanner for Go
License:        BSD-2-Clause
Group:          Development/Languages/Golang
URL:            https://%{provider_prefix}
Source0:        %{repo}-%{version}.tar.xz
Source1:        rpmlintrc
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildArch:      noarch

BuildRequires:  golang-packaging
BuildRequires:  xz

%{go_nostrip}
%{go_provides}

%description
properties is a Go library for reading and writing properties files.

It supports reading from multiple files or URLs and Spring style recursive property
expansion of expressions like ${key} to their corresponding value. Value expressions
can refer to other keys like in ${key} or to environment variables like in ${USER}.
Filenames can also contain environment variables like in /home/${USER}/myapp.properties.

Properties can be decoded into structs, maps, arrays and values through struct tags.

Comments and the order of keys are preserved. Comments can be modified and can be
written to the output.

The properties library supports both ISO-8859-1 and UTF-8 encoded data.

Starting from version 1.3.0 the behavior of the MustXXX() functions is configurable
by providing a custom ErrorHandler function. The default has changed from panic to
log.Fatal but this is configurable and custom error handling functions can be provided.

See the package documentation for details.

%prep
%setup -q -n %{repo}-%{version}

%build
%goprep %{import_path}
%gobuild

%install
%goinstall
%gosrc
%gofilelist

%check
%gotest ...

%files -f file.lst
%doc CHANGELOG.md README.md
%license LICENSE

%changelog
openSUSE Build Service is sponsored by