Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix conversion from int64 to string #136

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

marbu
Copy link

@marbu marbu commented May 15, 2021

Fixes #135

cmd/start.go Outdated
@@ -195,7 +196,7 @@ func runContainer(cmd *cobra.Command, args []string) {
if sizeBluestoreBlockToBytes == 0 {
log.Fatal("Wrong unit passed: ", getSize(flavor), ". Please refer to https://en.wikipedia.org/wiki/Byte.")
}
envs = append(envs, "BLUESTORE_BLOCK_SIZE="+string(sizeBluestoreBlockToBytes))
envs = append(envs, "BLUESTORE_BLOCK_SIZE="+fmt.Sprint(sizeBluestoreBlockToBytes))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use strconv.Itoa() instead.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like strconv.Itoa() expects int while here we have int64:

./start.go:198:61: cannot use sizeBluestoreBlockToBytes (type int64) as type int in argument to strconv.Itoa

So I used strconv.FormatInt instead.

Fixes ceph#135

Signed-off-by: Martin Bukatovic <martin.bukatovic@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build attempt on Fedora 33 failed
2 participants