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

Problem with readme code example #4

Closed
AmrSaber opened this issue May 9, 2023 · 1 comment
Closed

Problem with readme code example #4

AmrSaber opened this issue May 9, 2023 · 1 comment

Comments

@AmrSaber
Copy link

AmrSaber commented May 9, 2023

This is the current code sample from the readme...

import (
    "fmt"
    "github.com/imusmanmalik/randomizer"
)

func main() {
    // Generate a random integer between 0 and 100
    n := yourpackage.RandomInt(100)
    fmt.Println(n)

    // Generate a random byte slice with 16 bytes
    b := yourpackage.RandomBytes(16)
    fmt.Printf("%x\n", b)

    // Generate a random string with 10 characters
    s := yourpackage.RandomString(10)
    fmt.Println(s)
}

As you see the coded uses the package yourpackage instead of randomizer which is an obvious error especially as the package itself is imported at the beginning of the code.

@imusmanmalik
Copy link
Owner

@AmrSaber Thanks for the hint ❤️

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

No branches or pull requests

2 participants