github.com/decred/politeia@v1.4.0/politeiawww/cmd/cmswww/usersubcontractors.go (about) 1 // Copyright (c) 2017-2019 The Decred developers 2 // Use of this source code is governed by an ISC 3 // license that can be found in the LICENSE file. 4 5 package main 6 7 import ( 8 v1 "github.com/decred/politeia/politeiawww/api/cms/v1" 9 "github.com/decred/politeia/politeiawww/cmd/shared" 10 ) 11 12 // UserSubContractorsCmd gets the subcontractors for the logged in user. 13 type UserSubContractorsCmd struct { 14 } 15 16 // Execute executes the user subcontractors command. 17 func (cmd *UserSubContractorsCmd) Execute(args []string) error { 18 // Get user subcontractors 19 uir, err := client.UserSubContractors( 20 &v1.UserSubContractors{}) 21 if err != nil { 22 return err 23 } 24 25 // Print user sub contractors 26 return shared.PrintJSON(uir) 27 }