Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
hellt committed Apr 28, 2023
1 parent a3423c1 commit 50cd85b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion clab/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,8 @@ func (c *CLab) processStartupConfig(nodeCfg *types.NodeConfig) error {
log.Debugf("Node %q startup-config is an embedded config: %q", nodeCfg.ShortName, p)
// for embedded config we create a file with the name embedded.partial.cfg
// as embedded configs are meant to be partial configs
absDestFile := c.TopoPaths.StartupConfigDownloadFileAbsPath(nodeCfg.ShortName, "embedded.partial.cfg")
absDestFile := c.TopoPaths.StartupConfigDownloadFileAbsPath(
nodeCfg.ShortName, "embedded.partial.cfg")

err = utils.CreateFile(absDestFile, p)
if err != nil {
Expand Down
3 changes: 2 additions & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ func getLatestVersion(ctx context.Context, vc chan string) { // skipcq: RVV-A000
},
}

req, err := http.NewRequestWithContext(ctx, "HEAD", fmt.Sprintf("%s/releases/latest", repoUrl), nil)
req, err := http.NewRequestWithContext(ctx, "HEAD",
fmt.Sprintf("%s/releases/latest", repoUrl), nil)
if err != nil {
log.Debugf("error occurred during latest version fetch: %v", err)
return
Expand Down
3 changes: 2 additions & 1 deletion nodes/default_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,8 @@ func (d *DefaultNode) VerifyLicenseFileExists(_ context.Context) error {
// license is not required
return nil
default:
return fmt.Errorf("unknown license policy value %s for node %s kind %s", d.LicensePolicy, d.Config().ShortName, d.Cfg.Kind)
return fmt.Errorf("unknown license policy value %s for node %s kind %s",
d.LicensePolicy, d.Config().ShortName, d.Cfg.Kind)
}
}
// if license is provided check path exists
Expand Down
2 changes: 1 addition & 1 deletion utils/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func CopyFile(src, dst string, mode os.FileMode) (err error) {
return CopyFileContents(src, dst, mode)
}

// IsHttpUri check if the url is a downloadable uri
// IsHttpUri check if the url is a downloadable uri.
func IsHttpUri(s string) bool {
return strings.HasPrefix(s, "http://") || strings.HasPrefix(s, "https://")
}
Expand Down

0 comments on commit 50cd85b

Please sign in to comment.