Commit 59aec7f3 authored by Malte Bauch's avatar Malte Bauch
Browse files

fixing simple linting errors:

- File is not `gofmt`-ed
- Package comment should be of the form ...
parent bca99cb4
......@@ -11,7 +11,7 @@ import (
// Capabilities sends a gNMI Capabilities request to the specified target
// and prints the supported models to stdout
func Capabilities(a, u , p string) error {
func Capabilities(a, u, p string) error {
cfg := gnmi.Config{
Addr: a,
Username: u,
......
......@@ -9,7 +9,7 @@ import (
)
// Get sends a gNMI Get request to the specified target and prints the response to stdout
func Get(a, u, p string, args...string) error {
func Get(a, u, p string, args ...string) error {
sbi := &nucleus.OpenConfig{}
opts := &nucleus.GnmiTransportOptions{
Config: gnmi.Config{
......
......@@ -8,10 +8,10 @@ import (
var testSchema *ytypes.Schema
func init(){
func init() {
var err error
testSchema, err = model.Schema()
if err != nil {
log.Fatal(err)
}
}
\ No newline at end of file
}
......@@ -12,9 +12,10 @@ import (
"syscall"
"time"
)
// Subscribe starts a gNMI subscriber requersting the specified paths on the target and
// logs the response to stdout. Only 'stream' mode with 'sample' operation supported.
func Subscribe(a, u, p string, sample, heartbeat int64, args...string) error{
func Subscribe(a, u, p string, sample, heartbeat int64, args ...string) error {
sbi := &nucleus.OpenConfig{}
tOpts := &nucleus.GnmiTransportOptions{
Config: gnmi.Config{
......@@ -27,7 +28,7 @@ func Subscribe(a, u, p string, sample, heartbeat int64, args...string) error{
RespChan: make(chan *gpb.SubscribeResponse),
}
device, err := nucleus.NewDevice(sbi,tOpts)
device, err := nucleus.NewDevice(sbi, tOpts)
if err != nil {
return err
}
......
......@@ -28,6 +28,7 @@ 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.
*/
package cmd
import (
......
......@@ -28,6 +28,7 @@ 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.
*/
package cmd
import (
......@@ -39,7 +40,7 @@ import (
var capabilitiesCmd = &cobra.Command{
Use: "capabilities",
Short: "capabilities request",
Long: `Sends a gNMI Capabilities request to the specified target
Long: `Sends a gNMI Capabilities request to the specified target
// and prints the supported models to stdout.`,
RunE: func(cmd *cobra.Command, args []string) error {
return cli.Capabilities(username, password, address)
......
......@@ -28,6 +28,7 @@ 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.
*/
package cmd
import (
......
......@@ -28,6 +28,7 @@ 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.
*/
package cmd
import (
......
......@@ -28,6 +28,7 @@ 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.
*/
package cmd
import (
......@@ -39,7 +40,7 @@ import (
var getCmd = &cobra.Command{
Use: "gosdn get",
Short: "get request",
Long: `Sends a gNMI Get request to the specified target and prints the response to stdout`,
Long: `Sends a gNMI Get request to the specified target and prints the response to stdout`,
RunE: func(cmd *cobra.Command, args []string) error {
return cli.Get(address, username, password, args...)
},
......
......@@ -28,6 +28,7 @@ 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.
*/
package cmd
import (
......
......@@ -28,6 +28,7 @@ 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.
*/
package cmd
import (
......
......@@ -33,5 +33,5 @@ package main
import "code.fbi.h-da.de/cocsn/gosdn/cmd"
func main() {
cmd.Execute()
cmd.Execute()
}
......@@ -28,6 +28,7 @@ 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.
*/
package cmd
import (
......@@ -39,7 +40,7 @@ import (
var legacyCmd = &cobra.Command{
Use: "legacy",
Short: "multiple ygot utils - not yet implemented",
Long: ``,
Long: ``,
RunE: func(cmd *cobra.Command, args []string) error {
return errors.New("not implemented")
},
......
......@@ -28,6 +28,7 @@ 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.
*/
package cmd
import (
......@@ -39,7 +40,7 @@ import (
var pathCmd = &cobra.Command{
Use: "path",
Short: "multiple ygot utils - not yet implemented",
Long: ``,
Long: ``,
RunE: func(cmd *cobra.Command, args []string) error {
return errors.New("not implemented")
},
......
......@@ -28,6 +28,7 @@ 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.
*/
package cmd
import (
......
......@@ -28,6 +28,7 @@ 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.
*/
package cmd
import (
......
......@@ -28,6 +28,7 @@ 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.
*/
package cmd
import (
......
......@@ -28,6 +28,7 @@ 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.
*/
package cmd
import (
......@@ -51,6 +52,6 @@ var setCmd = &cobra.Command{
func init() {
rootCmd.AddCommand(setCmd)
setCmd.Flags().StringVarP(&typ, "type", "t", "update", "Type of the set request. " +
setCmd.Flags().StringVarP(&typ, "type", "t", "update", "Type of the set request. "+
"Possible values: 'update', 'replace', and 'delete'")
}
......@@ -28,6 +28,7 @@ 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.
*/
package cmd
import (
......
......@@ -28,6 +28,7 @@ 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.
*/
package cmd
import (
......@@ -42,7 +43,7 @@ var bindAddr string
var targetCmd = &cobra.Command{
Use: "target",
Short: "start gnmi target",
Long: `Starts a gNMI target listening on the specified port.`,
Long: `Starts a gNMI target listening on the specified port.`,
RunE: func(cmd *cobra.Command, args []string) error {
return cli.Target(bindAddr)
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment