mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
daemon/cluster: normalize comment formatting
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
ba6bbca89a
commit
6625fa6103
4 changed files with 7 additions and 8 deletions
|
@ -47,10 +47,10 @@ func networkFromGRPC(n *swarmapi.Network) types.Network {
|
|||
network.CreatedAt, _ = gogotypes.TimestampFromProto(n.Meta.CreatedAt)
|
||||
network.UpdatedAt, _ = gogotypes.TimestampFromProto(n.Meta.UpdatedAt)
|
||||
|
||||
//Annotations
|
||||
// Annotations
|
||||
network.Spec.Annotations = annotationsFromGRPC(n.Spec.Annotations)
|
||||
|
||||
//DriverConfiguration
|
||||
// DriverConfiguration
|
||||
if n.Spec.DriverConfig != nil {
|
||||
network.Spec.DriverConfiguration = &types.Driver{
|
||||
Name: n.Spec.DriverConfig.Name,
|
||||
|
@ -58,7 +58,7 @@ func networkFromGRPC(n *swarmapi.Network) types.Network {
|
|||
}
|
||||
}
|
||||
|
||||
//DriverState
|
||||
// DriverState
|
||||
if n.DriverState != nil {
|
||||
network.DriverState = types.Driver{
|
||||
Name: n.DriverState.Name,
|
||||
|
|
|
@ -29,10 +29,10 @@ func NodeFromGRPC(n swarmapi.Node) types.Node {
|
|||
node.CreatedAt, _ = gogotypes.TimestampFromProto(n.Meta.CreatedAt)
|
||||
node.UpdatedAt, _ = gogotypes.TimestampFromProto(n.Meta.UpdatedAt)
|
||||
|
||||
//Annotations
|
||||
// Annotations
|
||||
node.Spec.Annotations = annotationsFromGRPC(n.Spec.Annotations)
|
||||
|
||||
//Description
|
||||
// Description
|
||||
if n.Description != nil {
|
||||
node.Description.Hostname = n.Description.Hostname
|
||||
if n.Description.Platform != nil {
|
||||
|
@ -58,7 +58,7 @@ func NodeFromGRPC(n swarmapi.Node) types.Node {
|
|||
}
|
||||
}
|
||||
|
||||
//Manager
|
||||
// Manager
|
||||
if n.ManagerStatus != nil {
|
||||
node.ManagerStatus = &types.ManagerStatus{
|
||||
Leader: n.ManagerStatus.Leader,
|
||||
|
|
|
@ -95,7 +95,7 @@ func validateDefaultAddrPool(defaultAddrPool []string, size uint32) error {
|
|||
// defaultAddrPool is not defined
|
||||
return nil
|
||||
}
|
||||
//if size is not set, then we use default value 24
|
||||
// if size is not set, then we use default value 24
|
||||
if size == 0 {
|
||||
size = 24
|
||||
}
|
||||
|
|
|
@ -93,7 +93,6 @@ func (c *Cluster) Init(req types.InitRequest) (string, error) {
|
|||
}
|
||||
}
|
||||
|
||||
//Validate Default Address Pool input
|
||||
if err := validateDefaultAddrPool(req.DefaultAddrPool, req.SubnetSize); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue