#package error

154 messages · Page 1 of 1 (latest)

sterile idol
#
package models

type Car struct {
    Year   int    `json:"year,omitempty"`
    Owner  People `json:"owner"`
}

type People struct {
    Name       string `json:"name"`
}
sterile pecan
fervent wadi
sterile idol
fervent wadi
#

then you don't have the same because config.go does not declare package config

sterile idol
fervent wadi
#

all files must have a package declaration

sterile idol
#

Is it a good practice?

fervent wadi
#

it's a good practice, that's how it works

sterile idol
sterile idol
#

I have this structure

#
package models

type People struct {
    Name       string `json:"name"`
}
fervent wadi
sterile idol
fervent wadi
#

imports need to specify the module name as outlined in that link

#

if you want to use a symbol from an imported package, the syntax is package.Symbol, models.Car in this case
I would advise you to do the tour https://go.dev/tour/basics/1 if you haven't already

sterile idol
#

oh, wait

#

there ,, not .

#

sorry

fervent wadi
#

what ,?

sterile idol
#

i thought you wrote it as package.Symbol.models.Car

fervent wadi
#

ah

#

it's just an actual comma, in the spoken language sense

sterile idol
#

yeah

sterile idol
fervent wadi
#

neither of those exist

#

you import packages, not files nor symbols

#

if you want to use a symbol from a package, you have to prefix it with the package name

sterile idol
fervent wadi
#

as shown in https://go.dev/tour/basics/1 ```go
import (
"fmt" // <- import
"math/rand" // <- import
)

func main() {
fmt.Println("My favorite number is", rand.Intn(10))
//---- -----
}```

sterile idol
fervent wadi
sterile idol
#
import (
    "models"
)
fervent wadi
sterile idol
#

So it should be

import (
    "effective-module/models"
)
fervent wadi
sterile idol
#

i am lost then

fervent wadi
sterile idol
#

i might open dictionary, because it seems like i don't understand

fervent wadi
#
import (
    "effective-module/models"
)

var foo models.Bar```
sterile idol
#

WTF

#

is it always like this?

fervent wadi
#

yes

#

ask again when you have accepted that fact, because that's not the whole truth 😉

sterile idol
#

Thank you for you passion and help

sterile idol
#

hello again

scarlet jungle
#

functions starting with a lowercase letter are private to the package - needs to be CreateUser

sterile idol
grim hamlet
faint estuary
grim hamlet
faint estuary
#

ok, so you feel the need to respond in the same way?

#

probably saying nothing would have been a better response

grim hamlet
faint estuary
#

wild attitude...

sterile idol
# grim hamlet The problem is your skill issue, dude

um, yes? i admit the fact, that i lack knowledge in Go, because i just started. And this statement from me wasn't serious, more of an ironic statement. That is why other skilled coders just ignored the statement.

sterile idol
#

i see, triggered programming noob

fervent wadi
sterile idol
#

You can't be seious, right

#

They made ukranian translate, but not russain

#

liberal gays

fervent wadi
sterile idol
fervent wadi
#

no, I don't

#

and I'm not interested in this discussion

#

if you want to help translating it to russian, I'm sure your contribution will be most welcome

sterile idol
#

10 times more

fervent wadi
#

again, not interested

#

if you want to submit translations, they will be welcome

sterile idol
#

no, they will not, because they should have just banned russian official materials

#

because there is no way ukrainians did and russian did not

#

Go dev team brought politics here, not me

fervent wadi
#

in the interest of conserving your time I will let you know that I will block you now
I do wish you happyness, this is not personal

#

I should be perfectly clear, I am not a mod and this is not a moderative action

#

I'm just blocking you on my account

sterile idol
#

does not make any sense to me

grim hamlet
grim hamlet
grim hamlet
sterile idol
#

You are going to tell me, that Go is more popular among ukrainians?

#

Я только сейчас обратил внимание на твой ник.

grim hamlet
sterile idol
#

Всё это очень странно.

grim hamlet
#

If you want I can drop you a link to the telegrams russian community and you can ask about this then

sterile idol
#

Да не, спасибо. Вот как раз уже написал

sterile idol
#

кстати у тебя профиль в гитхабе взорванный просто

#

надо будет и своим как-нибудь заняться gophercool

#

Если ты меня через переводчик читаешь, то предыдущие 2 предложения звучат дико

grim hamlet
sterile idol
#

ахахах

grim hamlet
grim hamlet
sterile idol
#

использовал сленг

#

хотя вряд ли украинский сленг отличается от нашего

#

тем более что Львовский

#

там большая часть русскоговорящая

grim hamlet
#

Блин, реально у меня есть ссылка в профиле, аахахах

#

А за "мусор" я б тебе по еб**у прописал :)

sterile idol
grim hamlet
sterile idol
#

и не надо тут кулаками махать. Между нами тысячи километров.

sterile idol
#

я джавист

#

для меня это просто дико выглядит с первого раза

#

а разве на украинском это так же пишется как и на русском?

grim hamlet
#

Українською це буде: "російський воєнний корабель, іди нахуй"...

Но это все таки сообщение адресовано агрессору, а не украинцам :)

sterile idol
#

Хм🤷‍♂️

#

я часто вижу эту надпись. Это у вас как слоган

sterile idol
#

Забавно, что один из важнейших ваших слоганов написан на языке "врага", еще и оскорбляя его

#

у нас ни одной кричалки или фразы на украинском

#

и нет оскорбительных сообщений.

grim hamlet
#

Что ты хочешь добиться?)

sterile idol
#

Многое говорит о наших нациях, не так ли?

#

причем самое прикольное, что я вообще не русский.

#

просто говорю на русском.

grim hamlet
grim hamlet
sterile idol
sterile idol
#

Да

#

Отсутвсие навыков критического мышления.

#

но прогер ты видимо неплохой.

grim hamlet
#

Ясно, отметь ветку как Solved и иди гуляй

Команда /solved

sterile idol
#

Вот вот

#

опять агрессируешь

#

а потом "русские это, русские то..."

#

"помогите"