From bdae4fd573dbc163bab3d0e2d1a5c457892037cd Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 7 Jul 2015 05:08:16 +0200 Subject: [PATCH] all: add some godoc synopsis comments --- accounts/account_manager.go | 16 ++++++---------- build/update-license.go | 1 + cmd/bootnode/main.go | 2 +- cmd/disasm/main.go | 1 + cmd/ethtest/main.go | 1 + cmd/evm/main.go | 1 + cmd/geth/main.go | 1 + cmd/utils/cmd.go | 1 + common/bytes.go | 1 + compression/rle/read_write.go | 1 + core/chain_manager.go | 1 + core/state/statedb.go | 1 + core/types/block.go | 1 + core/vm/vm.go | 1 + eth/backend.go | 1 + event/filter/filter.go | 1 + jsre/jsre.go | 1 + miner/miner.go | 1 + p2p/nat/nat.go | 2 +- p2p/server.go | 1 + rpc/xeth.go | 1 + tests/init.go | 1 + trie/trie.go | 1 + xeth/xeth.go | 2 +- 24 files changed, 29 insertions(+), 13 deletions(-) diff --git a/accounts/account_manager.go b/accounts/account_manager.go index 8262faf216..c9e06261a8 100644 --- a/accounts/account_manager.go +++ b/accounts/account_manager.go @@ -14,18 +14,14 @@ // You should have received a copy of the GNU Lesser General Public License // along with go-ethereum. If not, see . -/* - -This abstracts part of a user's interaction with an account she controls. -It's not an abstraction of core Ethereum accounts data type / logic - -for that see the core processing code of blocks / txs. - -Currently this is pretty much a passthrough to the KeyStore interface, -and accounts persistence is derived from stored keys' addresses - -*/ +// Package implements a private key management facility. +// +// This abstracts part of a user's interaction with an account she controls. package accounts +// Currently this is pretty much a passthrough to the KeyStore interface, +// and accounts persistence is derived from stored keys' addresses + import ( "crypto/ecdsa" crand "crypto/rand" diff --git a/build/update-license.go b/build/update-license.go index ad7aad3942..abb17f872f 100644 --- a/build/update-license.go +++ b/build/update-license.go @@ -16,6 +16,7 @@ address for each author. See git-shortlog(1) for an explanation of the Please review the resulting diff to check whether the correct copyright assignments are performed. */ + package main import ( diff --git a/cmd/bootnode/main.go b/cmd/bootnode/main.go index 6f0ae4bd5f..397fa099c8 100644 --- a/cmd/bootnode/main.go +++ b/cmd/bootnode/main.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with go-ethereum. If not, see . -// Command bootnode runs a bootstrap node for the Discovery Protocol. +// bootnode runs a bootstrap node for the Ethereum Discovery Protocol. package main import ( diff --git a/cmd/disasm/main.go b/cmd/disasm/main.go index 93c85b8bbb..4bcd8608aa 100644 --- a/cmd/disasm/main.go +++ b/cmd/disasm/main.go @@ -14,6 +14,7 @@ // You should have received a copy of the GNU General Public License // along with go-ethereum. If not, see . +// disasm is a pretty-printer for EVM bytecode. package main import ( diff --git a/cmd/ethtest/main.go b/cmd/ethtest/main.go index b2acd84c71..61276b1770 100644 --- a/cmd/ethtest/main.go +++ b/cmd/ethtest/main.go @@ -14,6 +14,7 @@ // You should have received a copy of the GNU General Public License // along with go-ethereum. If not, see . +// ethtest executes Ethereum JSON tests. package main import ( diff --git a/cmd/evm/main.go b/cmd/evm/main.go index 9c1bd4b72d..6420c83be1 100644 --- a/cmd/evm/main.go +++ b/cmd/evm/main.go @@ -14,6 +14,7 @@ // You should have received a copy of the GNU General Public License // along with go-ethereum. If not, see . +// evm executes EVM code snippets. package main import ( diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 2511210303..bb6ddc1e27 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -14,6 +14,7 @@ // You should have received a copy of the GNU General Public License // along with go-ethereum. If not, see . +// geth is the official command-line client for Ethereum. package main import ( diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index 9d95732c00..2949d24704 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -14,6 +14,7 @@ // You should have received a copy of the GNU General Public License // along with go-ethereum. If not, see . +// Package utils contains internal helper functions for go-ethereum commands. package utils import ( diff --git a/common/bytes.go b/common/bytes.go index 564cfe3396..a65c0122bb 100644 --- a/common/bytes.go +++ b/common/bytes.go @@ -14,6 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with go-ethereum. If not, see . +// Package common contains various helper functions. package common import ( diff --git a/compression/rle/read_write.go b/compression/rle/read_write.go index 2903cd101c..be5d1fbcc6 100644 --- a/compression/rle/read_write.go +++ b/compression/rle/read_write.go @@ -14,6 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with go-ethereum. If not, see . +// Package rle implements the run-length encoding used for Ethereum data. package rle import ( diff --git a/core/chain_manager.go b/core/chain_manager.go index d8123c14e9..bd49bafc21 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -14,6 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with go-ethereum. If not, see . +// Package core implements the Ethereum consensus protocol. package core import ( diff --git a/core/state/statedb.go b/core/state/statedb.go index 7271373dd1..3a2ad10e22 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -14,6 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with go-ethereum. If not, see . +// Package state provides a caching layer atop the Ethereum state trie. package state import ( diff --git a/core/types/block.go b/core/types/block.go index 45bab2c95e..562fa64b9a 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -14,6 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with go-ethereum. If not, see . +// Package types contains data types related to Ethereum consensus. package types import ( diff --git a/core/vm/vm.go b/core/vm/vm.go index 3fca5f6369..9b3fd0009b 100644 --- a/core/vm/vm.go +++ b/core/vm/vm.go @@ -14,6 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with go-ethereum. If not, see . +// Package vm implements the Ethereum Virtual Machine. package vm import ( diff --git a/eth/backend.go b/eth/backend.go index ede8af88fe..391a610e32 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -14,6 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with go-ethereum. If not, see . +// Package eth implements the Ethereum protocol. package eth import ( diff --git a/event/filter/filter.go b/event/filter/filter.go index 1cdd6819d7..90bc4bd460 100644 --- a/event/filter/filter.go +++ b/event/filter/filter.go @@ -14,6 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with go-ethereum. If not, see . +// Package filter implements event filters. package filter import "reflect" diff --git a/jsre/jsre.go b/jsre/jsre.go index b226b7aaa4..c05af29a3f 100644 --- a/jsre/jsre.go +++ b/jsre/jsre.go @@ -14,6 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with go-ethereum. If not, see . +// Package jsre provides execution environment for JavaScript. package jsre import ( diff --git a/miner/miner.go b/miner/miner.go index 4d44b8c74f..173be1a142 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -14,6 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with go-ethereum. If not, see . +// Package miner implements Ethereum block creation and mining. package miner import ( diff --git a/p2p/nat/nat.go b/p2p/nat/nat.go index e7f13ad48a..1d4140aa04 100644 --- a/p2p/nat/nat.go +++ b/p2p/nat/nat.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with go-ethereum. If not, see . -// Package nat provides access to common port mapping protocols. +// Package nat provides access to common network port mapping protocols. package nat import ( diff --git a/p2p/server.go b/p2p/server.go index 870eb55900..33de4f32af 100644 --- a/p2p/server.go +++ b/p2p/server.go @@ -14,6 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with go-ethereum. If not, see . +// Package p2p implements the Ethereum p2p network protocols. package p2p import ( diff --git a/rpc/xeth.go b/rpc/xeth.go index e7982b15b8..607f45274a 100644 --- a/rpc/xeth.go +++ b/rpc/xeth.go @@ -14,6 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with go-ethereum. If not, see . +// Package rpc implements the Ethereum JSON-RPC API. package rpc import ( diff --git a/tests/init.go b/tests/init.go index 7ccf2098d6..94178af5fd 100644 --- a/tests/init.go +++ b/tests/init.go @@ -14,6 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with go-ethereum. If not, see . +// Package tests implements execution of Ethereum JSON tests. package tests import ( diff --git a/trie/trie.go b/trie/trie.go index 8028cc5f8f..30c2569fa5 100644 --- a/trie/trie.go +++ b/trie/trie.go @@ -14,6 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with go-ethereum. If not, see . +// Package trie implements Merkle Patricia Tries. package trie import ( diff --git a/xeth/xeth.go b/xeth/xeth.go index 75ff8539a9..d1085dc920 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with go-ethereum. If not, see . -// eXtended ETHereum +// Package xeth is the interface to all Ethereum functionality. package xeth import (