#package error
154 messages · Page 1 of 1 (latest)
If you recently created it sometimes you have to restart vscode
?
i have the same but with main.go and models.go
then you don't have the same because config.go does not declare package config
i removed package. Still the same error
all files must have a package declaration
I put main package in models.go and everything seems good now
Is it a good practice?
it's a good practice, that's how it works
Thank you for not just spitting answer, but making me find the way by myself. I appreciate it.
i faced anpther isuue
I have this structure
package models
type People struct {
Name string `json:"name"`
}
i am reading it
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
but isn't models already a package?
oh, wait
there ,, not .
sorry
what ,?
package.Symbol, models.Car
i thought you wrote it as package.Symbol.models.Car
yeah
but why would someone import certain Symbol, if they can just import the whole file?
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

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))
//---- -----
}```
ok, got it
yyeess... But isn't it the same as mine?
no
import (
"models"
)
as I have explained, that is not a valid import statement per #1232664086526038016 message
where "that link" refers to #1232664086526038016 message
with your subsequent issue being #1232664086526038016 message
So it should be
import (
"effective-module/models"
)
it already was #1232664086526038016 message
i am lost then
when I say "subsequent issue" I'm referring to #1232664086526038016 message and #1232664086526038016 message
import (
"effective-module/models"
)
var foo models.Bar```
yes
ask again when you have accepted that fact, because that's not the whole truth 😉
Thank you for you passion and help
functions starting with a lowercase letter are private to the package - needs to be CreateUser
wow, thank you!
This language is garbage
The problem is your skill issue, dude
really? that's the way you teach?
Dude said that the language is a garbage due to the syntax.
ok, so you feel the need to respond in the same way?
probably saying nothing would have been a better response
Yes, cuz Go is the best compromise. Garbage is his mind
wild attitude...
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.
hahaha
i see, triggered programming noob
the tour covers this btw https://go.dev/tour
You can't be seious, right
They made ukranian translate, but not russain
liberal gays
this is not the place
ok, but you understand the stupidity
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
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
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
does not make any sense to me
It's not a reason (that you just started studying) to claim the language a garbage. It's your lack of experience.
Many of the volunteers from Ukraine just made a translation, not the Golang team. XD
Learn the foundation of this processes
Dude, take it easy
Still sounds like fiction
I've talked with these volunteers, I know what I'm talking about
Why didn't russians translate then?
You are going to tell me, that Go is more popular among ukrainians?
Я только сейчас обратил внимание на твой ник.
I can't say it, due to lack of knowledge about this. Maybe the russian Golang community doesn't care about it
Всё это очень странно.
If you want I can drop you a link to the telegrams russian community and you can ask about this then
Да не, спасибо. Вот как раз уже написал
Where? XD
Кентам Лидам
кстати у тебя профиль в гитхабе взорванный просто
надо будет и своим как-нибудь заняться 
Если ты меня через переводчик читаешь, то предыдущие 2 предложения звучат дико
Я где то оставил ссылку на профиль? 0_0
Ну плохо у меня с грамматикой, но суть то понял!!!!
Так ты не ответил :)
Не не, всё в порядке. Я про свою речь говорил
использовал сленг
хотя вряд ли украинский сленг отличается от нашего
тем более что Львовский
там большая часть русскоговорящая
Блин, реально у меня есть ссылка в профиле, аахахах
А за "мусор" я б тебе по еб**у прописал :)
о каком мусоре речь?
Ты же писал... Про язык
и не надо тут кулаками махать. Между нами тысячи километров.
чел, это шутка
я джавист
для меня это просто дико выглядит с первого раза
а разве на украинском это так же пишется как и на русском?
Українською це буде: "російський воєнний корабель, іди нахуй"...
Но это все таки сообщение адресовано агрессору, а не украинцам :)
Частично...
Забавно, что один из важнейших ваших слоганов написан на языке "врага", еще и оскорбляя его
у нас ни одной кричалки или фразы на украинском
и нет оскорбительных сообщений.
Что ты хочешь добиться?)
Многое говорит о наших нациях, не так ли?
причем самое прикольное, что я вообще не русский.
просто говорю на русском.
Мне многое говорит поддержка русского народа агрессивных действий с русской стороны на территории независимой страны :)
Тогда вообще не понимаю зачем этот разговор
Ты очень много всталяешь своего мнения политического в разговор. словами "агрессор", "агрессивных действий". Я еще ни разу никак не высказался об украинцах и их действиях
Наверно у меня есть на это причина ;)
Ясно, отметь ветку как Solved и иди гуляй
Команда /solved