From f0a01ced0aad52437f62b626e8ffe43c3ae689a5 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Fri, 25 Aug 2017 12:25:04 -0500 Subject: [PATCH] sampleconfig: Add package README and doc.go. This adds a readme and doc.go for the sampleconfig package so it is consistent with all of the other packages. While here, it also changes the exported value to a constant and removes the unused sampleConfigFilename constant. --- config.go | 1 - sampleconfig/README.md | 23 +++++++++++++++++++++++ sampleconfig/doc.go | 12 ++++++++++++ sampleconfig/sampleconfig.go | 2 +- 4 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 sampleconfig/README.md create mode 100644 sampleconfig/doc.go diff --git a/config.go b/config.go index b9ca0c51..ce76762f 100644 --- a/config.go +++ b/config.go @@ -55,7 +55,6 @@ const ( defaultMaxOrphanTransactions = 1000 defaultMaxOrphanTxSize = 5000 defaultSigCacheMaxSize = 100000 - sampleConfigFilename = "sample-dcrd.conf" defaultTxIndex = false defaultNoExistsAddrIndex = false ) diff --git a/sampleconfig/README.md b/sampleconfig/README.md new file mode 100644 index 00000000..e01c0749 --- /dev/null +++ b/sampleconfig/README.md @@ -0,0 +1,23 @@ +sampleconfig +============ + +[![Build Status](http://img.shields.io/travis/decred/dcrd.svg)](https://travis-ci.org/decred/dcrd) +[![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) +[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/decred/dcrd/sampleconfig) + +Package sampleconfig provides a single constant that contains the contents of +the sample configuration file for dcrd. This is provided for tools that perform +automatic configuration and would like to ensure the generated configuration +file not only includes the specifically configured values, but also provides +samples of other configuration options. + +## Installation and Updating + +```bash +$ go get -u github.com/decred/dcrd/sampleconfig +``` + +## License + +Package sampleconfig is licensed under the [copyfree](http://copyfree.org) ISC +License. diff --git a/sampleconfig/doc.go b/sampleconfig/doc.go new file mode 100644 index 00000000..565a8140 --- /dev/null +++ b/sampleconfig/doc.go @@ -0,0 +1,12 @@ +// Copyright (c) 2017 The Decred developers +// Use of this source code is governed by an ISC +// license that can be found in the LICENSE file. + +/* +Package sampleconfig provides a single constant that contains the contents of +the sample configuration file for dcrd. This is provided for tools that perform +automatic configuration and would like to ensure the generated configuration +file not only includes the specifically configured values, but also provides +samples of other configuration options. +*/ +package sampleconfig diff --git a/sampleconfig/sampleconfig.go b/sampleconfig/sampleconfig.go index 8464a833..524ddb1c 100644 --- a/sampleconfig/sampleconfig.go +++ b/sampleconfig/sampleconfig.go @@ -5,7 +5,7 @@ package sampleconfig // FileContents is a string containing the commented example config for dcrd. -var FileContents = `[Application Options] +const FileContents = `[Application Options] ; ------------------------------------------------------------------------------ ; Data settings